Skip to content

Commit

Permalink
Merge pull request #55 from Gloveland/tidying_up
Browse files Browse the repository at this point in the history
Tidying up 2nd PR
  • Loading branch information
DariusIMP authored Mar 26, 2022
2 parents 3b488dd + 49d9868 commit 625760a
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion lib/datacollection/measurements_collector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter_blue/flutter_blue.dart';
import 'package:lsa_gloves/datacollection/measurements_listener.dart';
import 'package:lsa_gloves/datacollection/measurements_writer.dart';
import 'dart:developer' as developer;
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';

/// Class to take in charge the responsibility of receiving and processing
/// the measurements taken from the device.
Expand Down
2 changes: 1 addition & 1 deletion lib/datacollection/measurements_listener.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';

/// "Interface" for classes that need to react to measurement events.
abstract class MeasurementsListener {
Expand Down
2 changes: 1 addition & 1 deletion lib/datacollection/measurements_writer.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter_blue/flutter_blue.dart';
import 'package:lsa_gloves/datacollection/measurements_listener.dart';
import 'package:lsa_gloves/datacollection/storage.dart';
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';

/// Writer class to receive GloveMeasurements and store them into files.
class MeasurementsWriter with MeasurementsListener {
Expand Down
4 changes: 2 additions & 2 deletions lib/datacollection/storage.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';
import 'dart:io';
import 'dart:convert';
import 'package:lsa_gloves/model/finger.dart';
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/glove/finger.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';
import 'package:lsa_gloves/edgeimpulse/api_client.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:developer' as developer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import 'package:lsa_gloves/model/vector3.dart';
import 'package:lsa_gloves/glove/vector3.dart';

/// Class to encapsulate the acceleration values received from the glove.
class Acceleration with Vector3 {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/model/gyro.dart → lib/glove/gyro.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import 'package:lsa_gloves/model/vector3.dart';
import 'package:lsa_gloves/glove/vector3.dart';

/// Class to encapsulate the gyroscope values received from the glove.
class Gyro with Vector3 {
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ void main() {
runApp(
ChangeNotifierProvider(
create: (_) => BluetoothBackend(),
child: MyApp(),
child: LsaGlovesApp(),
)
);
}

class MyApp extends StatelessWidget {
// This widget is the root of your application.
class LsaGlovesApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/ble_data_collection_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart';
import 'package:lsa_gloves/datacollection/measurements_collector.dart';
import 'package:lsa_gloves/datacollection/measurements_listener.dart';
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';
import 'package:provider/provider.dart';
import 'package:simple_timer/simple_timer.dart';
import 'dart:developer' as developer;
Expand Down
8 changes: 4 additions & 4 deletions lib/pages/data_visualization_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import 'package:intl/intl.dart';
import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart';
import 'package:lsa_gloves/datacollection/measurements_collector.dart';
import 'package:lsa_gloves/datacollection/measurements_listener.dart';
import 'package:lsa_gloves/model/finger.dart';
import 'package:lsa_gloves/model/glove_measurement.dart';
import 'package:lsa_gloves/model/sensor_value.dart';
import 'package:lsa_gloves/model/vector3.dart';
import 'package:lsa_gloves/glove/finger.dart';
import 'package:lsa_gloves/glove/glove_measurement.dart';
import 'package:lsa_gloves/glove/sensor_value.dart';
import 'package:lsa_gloves/glove/vector3.dart';
import 'package:lsa_gloves/navigation/navigation_drawer.dart';
import 'package:provider/provider.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
Expand Down
10 changes: 5 additions & 5 deletions lib/pages/file_content_chart_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:lsa_gloves/connection/ble/bluetooth_backend.dart';
import 'package:lsa_gloves/datacollection/storage.dart';
import 'package:lsa_gloves/model/acceleration.dart';
import 'package:lsa_gloves/model/finger.dart';
import 'package:lsa_gloves/model/gyro.dart';
import 'package:lsa_gloves/model/sensor_value.dart';
import 'package:lsa_gloves/model/vector3.dart';
import 'package:lsa_gloves/glove/acceleration.dart';
import 'package:lsa_gloves/glove/finger.dart';
import 'package:lsa_gloves/glove/gyro.dart';
import 'package:lsa_gloves/glove/sensor_value.dart';
import 'package:lsa_gloves/glove/vector3.dart';
import 'package:lsa_gloves/navigation/navigation_drawer.dart';
import 'package:provider/provider.dart';
import 'package:syncfusion_flutter_charts/charts.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:lsa_gloves/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());
await tester.pumpWidget(LsaGlovesApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
Expand Down

0 comments on commit 625760a

Please sign in to comment.