Skip to content

Commit 09e8a05

Browse files
resolved conflicts
1 parent 3a57a4f commit 09e8a05

File tree

3 files changed

+148
-10
lines changed

3 files changed

+148
-10
lines changed

lib/constants.dart

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,129 @@ List<String> connectWithUs = [
133133
'Developers'
134134
];
135135
String softwareLicenses = 'Software Licenses';
136+
String tryDifferentSearchSuggestion = 'Try a different search term';
137+
String noInstrumentsFoundMessage = 'No instruments found';
138+
String searchInstrumentsHint = 'Search instruments...';
139+
String instrumentsTitle = 'Instruments';
140+
String faqTitle = 'FAQs';
141+
String launchError = 'Could not launch';
142+
String Q = 'Q:';
143+
String A = 'A:';
144+
145+
class FAQConstants {
146+
static const String whatIsPslab =
147+
"What is Pocket Science Lab? What can I do with it?";
148+
static const String whereToBuy = "Where can I buy a Pocket Science Lab?";
149+
static const String downloadAndroidApp =
150+
"Where can I download the Android App for Pocket Science Lab?";
151+
static const String downloadDesktopApp =
152+
"Where can I download the desktop app for Pocket Science Lab for Windows, Linux and Mac?";
153+
static const String howToConnect =
154+
"How can I connect to the device? What kind of USB cable do I need? What is an OTG USB cable?";
155+
static const String reportBug =
156+
"I found a bug in one of your apps or hardware. What to do? Where should I report it?";
157+
static const String recordData =
158+
"Can I record or save data in the apps and export or import it?";
159+
static const String usePhoneSensors =
160+
"My Android phone already has some sensors, can I use them with the PSLab app as well?";
161+
static const String compatibleSensors =
162+
"Which external sensors can I use with a PSLab device and the apps? Which ones are compatible?";
163+
164+
static const String whatIsPslabAnswer =
165+
"Pocket Science Lab (PSLab) is a small USB powered hardware board that can be used for measurements and experiments. It works as an extension for Android phones or PCs. PSLab comes with a built-in Oscilloscope, Multimeter, Wave Generator, Logic Analyzer, Power Source, and many more instruments. It can also be used as a robotics control app. And, we are constantly adding more digital instruments. PSLab is many devices in one. Simply connect two wires to the relevant pins (description is on the back of the PSLab board) and start measuring. You can use our Open Source Android or desktop app to view and collect the data. You can also plug in hundreds of compatible I²C standard sensors to the PSLab pin slots. It works without the need for programming. So, what experiments you do is just limited to your imagination!";
166+
167+
static const String whereToBuyAnswer =
168+
"There is an overview page for shops where you can buy a Pocket Science Lab device in different regions on the website at ";
169+
static const String whereToBuyLinkText = "https://pslab.io/shop/";
170+
static const String whereToBuyLinkUrl = "https://pslab.io/shop/";
171+
172+
static const String downloadAndroidAppAnswer =
173+
"The app can be downloaded from F-Droid or Play Store. Simply click on the links to be directed over!";
174+
static const String downloadAndroidAppLinkText = "Playstore";
175+
static const String downloadAndroidAppLinkUrl =
176+
"https://play.google.com/store/apps/details?id=io.pslab&hl=en_IN";
177+
178+
static const String downloadDesktopAppAnswer =
179+
"We are developing a desktop app for Windows, Linux and Mac in our desktop Git repository. You can find it in the install branch of the project here. The app is still under development. We are using technologies like Electron and Python, that work on all platforms. However, to make the final installer work everywhere requires some tweaks and improvements here and there. So, please expect some glitches. You can use the tracker in the repository to submit issues, bugs and feature requests.";
180+
181+
static const String howToConnectAnswer =
182+
"To connect to the device you need an OTG USB cable (OTG = On the go) which is a USB cable that allows connected devices to switch back and forth between the roles of host and device. USB cables that are not OTG compatible will NOT work. It is also possible to extend the PSLab with an ESP WiFi chip or a Bluetooth chip and communicate through these gateways using the Android app. You can refer to the hardware developer documentation and code on GitHub for more details here.";
183+
184+
static const String reportBugAnswer =
185+
"We have issue trackers in all our projects. They are currently hosted on GitHub. In order to submit a bug or feature request you need to login to the service.";
186+
static const String reportBugLinkText =
187+
"A list of our PSLab repositories is here";
188+
static const String reportBugLinkUrl = "https://github.com/fossasia";
189+
190+
static const String recordDataAnswer =
191+
"Yes, we have implemented a record and play function or a way to save and open configurations in the instruments on the Android and desktop app. Data you record can be imported into the apps and viewed. This feature is still under heavy development, but works well in most places. You can find it in the top bar of the apps. There are buttons to record, play, save and open data.";
192+
193+
static const String usePhoneSensorsAnswer =
194+
"Yes, absolutely. You can install the PSLab Android app (Play Store, Fdroid) on your phone and use it with devices such as Luxmeter or Compass. We are adding support for more built-in sensors step by step.";
195+
196+
static const String compatibleSensorsAnswer =
197+
"In our apps we use the industry standard I²C (Wikipedia). You can get the data from sensors that are connected to the device through the USB port using an OTG USB cable (OTG = On the go) which is a USB cable that allows connected devices to switch back and forth between the roles of host and device. For the transfer we use UART (universal asynchronous receiver-transmitter, Wikipedia). Many sensors can be used with specific instruments, e.g. Barometer, Thermometer, Gyroscope etc. You can access the configuration for sensors in the instrument settings on the top right burger menu of each instrument. All sensors using the I²C standard are compatible with the device. There are connection pins for analogue and digital sensors. You find the description of the pins on the back of the device. Even if there is no specific instrument in one of our apps yet, you can still view and store the raw data using the Oscilloscope instrument component. There is a page with a list of recommended sensors on the website.";
198+
}
199+
200+
String accelerometer = 'Accelerometer';
201+
String xAxis = 'x';
202+
String yAxis = 'y';
203+
String zAxis = 'z';
204+
String timeAxisLabel = 'Time(s)';
205+
String accelerationAxisLabel = 'm/s²';
206+
String minValue = 'Min: ';
207+
String maxValue = 'Max: ';
208+
String gyroscopeTitle = "Gyroscope";
209+
String gyroscopeAxisLabel = 'rad/s';
210+
String noData = 'No data available';
211+
String degreeSymbol = '°';
212+
String enterAngleRange = 'Enter angle (0 - 360)';
213+
String errorCannotBeEmpty = 'Cannot be empty';
214+
String servoValidNumberRange = 'Please enter a valid number between 0 and 360';
215+
String ok = 'Ok';
216+
String roboticArm = 'Robotic Arm';
217+
String play = 'Play';
218+
String pause = 'Pause';
219+
String stop = 'Stop';
220+
String controls = 'Controls';
221+
String saveData = 'Save Data';
222+
String showGuide = 'Show Guide';
223+
String showLoggedDataKey = 'show_logged_data';
224+
String showLoggedData = 'Show Logged Data';
225+
String setAngle = 'Set angle for Servo';
226+
String angleDialog = 'AngleDialog';
227+
List<String> servoLabels = [
228+
'Servo 1',
229+
'Servo 2',
230+
'Servo 3',
231+
'Servo 4',
232+
];
233+
String xyPlot = 'XY Plot';
234+
String enablePlot = 'Enable XY Plot';
235+
String trigger = 'Trigger';
236+
String timeBase = 'Timebase';
237+
String timeBaseAndTrigger = 'Timebase & Trigger';
238+
String offsets = 'Offsets';
239+
String dataAnalysis = 'Data Analysis';
240+
String fourierAnalysis = 'Fourier Analysis';
241+
String channels = 'Channels';
242+
String pslabMic = 'PSLab MIC';
243+
String inBuiltMic = 'In-Built MIC';
244+
String ch3Range = 'CH3 (+/- 3.3V)';
245+
String rangeValue = '+/-16V';
246+
String range = 'Range';
247+
String ch2 = 'CH2';
248+
String ch1 = 'CH1';
249+
String luxMeterTitle = 'Lux Meter';
250+
String builtIn = 'Built-In';
251+
String lx = 'Lx';
252+
String maxScaleError = 'Max Scale';
253+
String lightSensorError = 'Light sensor error:';
254+
String lightSensorInitialError = 'Failed to initialize light sensor:';
255+
String soundMeterError = 'Sound sensor error:';
256+
String soundMeterInitialError = 'Sound sensor initialization error:';
257+
String db = 'dB';
258+
String soundMeterTitle = 'Sound Meter';
136259
String magnetometerError = 'Magnetometer error:';
137260
String accelerometerError = 'Accelerometer error:';
138261
String compassTitle = 'Compass';

lib/main.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ import 'package:flutter/material.dart';
22
import 'package:provider/provider.dart';
33
import 'package:pslab/providers/board_state_provider.dart';
44
import 'package:pslab/providers/locator.dart';
5+
import 'package:pslab/view/accelerometer_screen.dart';
56
import 'package:pslab/view/connect_device_screen.dart';
67
import 'package:pslab/view/faq_screen.dart';
8+
import 'package:pslab/view/gyroscope_screen.dart';
79
import 'package:pslab/view/instruments_screen.dart';
10+
import 'package:pslab/view/luxmeter_screen.dart';
811
import 'package:pslab/view/oscilloscope_screen.dart';
12+
import 'package:pslab/view/robotic_arm_screen.dart';
913
import 'package:pslab/view/settings_screen.dart';
1014
import 'package:pslab/view/about_us_screen.dart';
1115
import 'package:pslab/view/software_licenses_screen.dart';
1216
import 'package:pslab/view/compass_screen.dart';
17+
import 'package:pslab/others/theme.dart';
18+
import 'package:pslab/view/soundmeter_screen.dart';
1319
import 'constants.dart';
1420

1521
void main() {
@@ -36,10 +42,9 @@ class MyApp extends StatelessWidget {
3642
_preCacheImages(context);
3743
return MaterialApp(
3844
debugShowCheckedModeBanner: false,
39-
theme: ThemeData(
40-
colorSchemeSeed: Colors.white,
41-
useMaterial3: true,
42-
),
45+
theme: AppTheme.lightTheme,
46+
darkTheme: AppTheme.darkTheme,
47+
themeMode: ThemeMode.system,
4348
initialRoute: '/',
4449
routes: {
4550
'/': (context) => const InstrumentsScreen(),
@@ -50,6 +55,11 @@ class MyApp extends StatelessWidget {
5055
'/settings': (context) => const SettingsScreen(),
5156
'/aboutUs': (context) => const AboutUsScreen(),
5257
'/softwareLicenses': (context) => const SoftwareLicensesScreen(),
58+
'/accelerometer': (context) => const AccelerometerScreen(),
59+
'/gyroscope': (context) => const GyroscopeScreen(),
60+
'/roboticArm': (context) => const RoboticArmScreen(),
61+
'/luxmeter': (context) => const LuxMeterScreen(),
62+
'/soundmeter': (context) => const SoundMeterScreen(),
5363
},
5464
);
5565
}

pubspec.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ dependencies:
3535
# The following adds the Cupertino Icons font to your application.
3636
# Use with the CupertinoIcons class for iOS style icons.
3737
cupertino_icons: ^1.0.8
38-
flutter_svg: ^2.0.17
38+
flutter_svg: ^2.2.0
3939
google_fonts: ^6.2.1
40-
fl_chart: ^0.70.1
41-
provider: ^6.1.2
40+
fl_chart: ^1.0.0
41+
provider: ^6.1.5
4242
usb_serial:
4343
git:
4444
url: https://github.com/AsCress/usbserial.git
@@ -48,13 +48,18 @@ dependencies:
4848
git:
4949
url: https://github.com/AsCress/flutter_audio_capture.git
5050
ref: master
51-
data: ^0.13.0
52-
permission_handler: ^11.3.1
51+
data: ^0.14.0
52+
permission_handler: ^12.0.0+1
5353
logger: ^2.5.0
5454
url_launcher: ^6.3.1
5555
font_awesome_flutter: ^10.8.0
5656
package_info_plus: ^8.3.0
5757
sensors_plus: ^6.1.1
58+
sleek_circular_slider: ^2.1.0
59+
gauge_indicator: ^0.4.3
60+
light: ^4.1.0
61+
connectivity_plus: ^6.1.4
62+
5863

5964
dev_dependencies:
6065
flutter_test:
@@ -65,7 +70,7 @@ dev_dependencies:
6570
# activated in the `analysis_options.yaml` file located at the root of your
6671
# package. See that file for information about deactivating specific lint
6772
# rules and activating additional ones.
68-
flutter_lints: ^4.0.0
73+
flutter_lints: ^6.0.0
6974
flutter_oss_licenses: ^3.0.4
7075

7176
# For information on the generic Dart part of this file, see the

0 commit comments

Comments
 (0)