diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 4c28ec9d6..70f8d4992 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -326,6 +326,8 @@ "sharingMessage": "Sharing PSLab Data", "delete": "Delete", "deleteHint": "Are you sure you want to delete this file?", + "documentationLink" : "https://docs.pslab.io/", + "documentationError" : "Could not open the documentation link", "deleteFile": "Delete File", "deleteAllData": "Delete All Data", "deleteCautionMessage": "Are you sure you want to delete all logged data for this instrument?", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index f5dc42539..7464a01a2 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -2248,6 +2248,18 @@ abstract class AppLocalizations { /// **'Please provide the maximum limit of lux value to be recorded'** String get accelerometerHighLimitHint; + /// No description provided for @documentationLink. + /// + /// In en, this message translates to: + /// **'https://docs.pslab.io/'** + String get documentationLink; + + /// No description provided for @documentationError. + /// + /// In en, this message translates to: + /// **'Could not open the documentation link'** + String get documentationError; + /// No description provided for @roboticArmIntro. /// /// In en, this message translates to: @@ -2259,6 +2271,7 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'• In the above figure, SQ1 is connected to the signal pin of the first servo motor. The servo\'s GND pin is connected to both the PSLab’s GND and the external power supply GND, while the VCC pin is connected to the external power supply VCC.\n• Similarly, connect the remaining servos to SQ2, SQ3, and SQ4 along with their respective GND and power supply connections.\n• Once connected, each servo can be controlled using either circular sliders for manual control or a timeline-based sequence for automated movement.'** String get roboticArmConnection; + } class _AppLocalizationsDelegate diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 22b69ef2c..28c9c99a7 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -1152,6 +1152,12 @@ class AppLocalizationsEn extends AppLocalizations { String get accelerometerHighLimitHint => 'Please provide the maximum limit of lux value to be recorded'; + @override + String get documentationLink => 'https://docs.pslab.io/'; + + @override + String get documentationError => 'Could not open the documentation link'; + @override String get roboticArmIntro => '• A robotic arm is a programmable mechanical device that mimics the movement of a human arm.\n• It uses servo motors to control its motion, and these motors are operated using PWM signals.\n• The PSLab provides four PWM square wave generators (SQ1, SQ2, SQ3, SQ4), allowing control of up to four servo motors and enabling a robotic arm with up to four degrees of freedom.'; diff --git a/lib/providers/robotic_arm_state_provider.dart b/lib/providers/robotic_arm_state_provider.dart index 250463e94..920b48ebc 100644 --- a/lib/providers/robotic_arm_state_provider.dart +++ b/lib/providers/robotic_arm_state_provider.dart @@ -45,10 +45,10 @@ class RoboticArmStateProvider extends ChangeNotifier { VoidCallback? onPlaybackEnd; RoboticArmStateProvider() { - _initTimelineDegrees(); _selectedFrequency = appLocalizations.frequency50Hz; _selectedMaxAngle = appLocalizations.angle180; _selectedDuration = appLocalizations.duration1Min; + _initTimelineDegrees(); } void _initTimelineDegrees() { diff --git a/lib/view/faq_screen.dart b/lib/view/faq_screen.dart index edaf6f488..aa5449ee1 100644 --- a/lib/view/faq_screen.dart +++ b/lib/view/faq_screen.dart @@ -124,7 +124,7 @@ class FAQScreen extends StatelessWidget { child: Row( children: [ const SizedBox( - width: 25, + width: 15, ), Text( faq.linkText!, diff --git a/lib/view/widgets/navigation_drawer.dart b/lib/view/widgets/navigation_drawer.dart index 41e2e9f04..10c5730bc 100644 --- a/lib/view/widgets/navigation_drawer.dart +++ b/lib/view/widgets/navigation_drawer.dart @@ -253,8 +253,15 @@ class _NavDrawerState extends State { fontSize: 14, ), ), - onTap: () { - /**/ + onTap: () async { + final launched = await launchUrl( + Uri.parse(appLocalizations.documentationLink)); + if (!launched && context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + content: Text(appLocalizations.documentationError)), + ); + } }, ), ListTile( diff --git a/lib/view/widgets/servo_card.dart b/lib/view/widgets/servo_card.dart index 0c81321a2..244d59e8d 100644 --- a/lib/view/widgets/servo_card.dart +++ b/lib/view/widgets/servo_card.dart @@ -27,7 +27,7 @@ class ServoCard extends StatelessWidget { Widget build(BuildContext context) { final provider = Provider.of(context); final sliderSize = - provider.maxAngle == 180 ? cardHeight * 0.95 : cardHeight * 0.72; + provider.maxAngle == 180 ? cardHeight * 0.95 : cardHeight * 0.75; return Container( decoration: BoxDecoration( @@ -108,7 +108,7 @@ class ServoCard extends StatelessWidget { ), infoProperties: InfoProperties( mainLabelStyle: TextStyle( - fontSize: 22, + fontSize: 25, color: Colors.black, fontWeight: FontWeight.normal, shadows: [