Skip to content

Commit

Permalink
Tidy up #7
Browse files Browse the repository at this point in the history
Removing unused ble_connection_error_page. This page was displayed when
the user pressed the record button in the data collection page while the
glove was not connected; however the button was already disabled when
there was not a glove connected to the app, making this page
logically unreachable.
  • Loading branch information
DariusIMP committed Mar 24, 2022
1 parent 2a99e56 commit 23a779d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 85 deletions.
2 changes: 0 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import 'package:flutter/material.dart';
import 'package:lsa_gloves/pages/ble_connection_error_page.dart';
import 'package:lsa_gloves/pages/ble_devices_connection_page.dart';
import 'package:lsa_gloves/pages/file_content_chart_page.dart';
import 'package:lsa_gloves/pages/home_page.dart';
Expand All @@ -25,7 +24,6 @@ class MyApp extends StatelessWidget {
routes: {
FileContentChartPage.routeName: (context) => FileContentChartPage(),
BleGloveConnectionPage.routeName: (context) => BleGloveConnectionPage(),
BleConnectionErrorPage.routeName: (context) => BleConnectionErrorPage(),
},
title: 'Lengua de señas Argentina',
theme: ThemeData(
Expand Down
73 changes: 0 additions & 73 deletions lib/pages/ble_connection_error_page.dart

This file was deleted.

10 changes: 0 additions & 10 deletions lib/pages/ble_data_collection_page.dart
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import 'dart:async';

import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
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/pages/ble_connection_error_page.dart';
import 'package:provider/provider.dart';
import 'package:simple_timer/simple_timer.dart';
import 'dart:developer' as developer;
Expand Down Expand Up @@ -160,17 +157,10 @@ class _BleDataCollectionState extends State<BleDataCollectionPage>

void _startRecording(BluetoothBackend bluetoothBackend) {
developer.log('startRecording');
if (bluetoothBackend.connectedDevices.isEmpty) {
developer.log('Cant start recording! No devices connected.');
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => BleConnectionErrorPage(),
maintainState: false));
} else {
bluetoothBackend.sendStartDataCollectionCommand();
_measurementsCollector.startCollecting(
this.selectedGesture, bluetoothBackend.dataCollectionCharacteristics);
_isRecording = true;
}
}

void _stopRecording(BluetoothBackend bluetoothBackend) async {
Expand Down

0 comments on commit 23a779d

Please sign in to comment.