Skip to content

Serial#36

Merged
MouradLachhab merged 63 commits intomasterfrom
serial
Oct 20, 2020
Merged

Serial#36
MouradLachhab merged 63 commits intomasterfrom
serial

Conversation

@MouradLachhab
Copy link
Copy Markdown
Contributor

Implemented Serial repository and Cyton transformer. Will need to dynamically change them with Bluetooth when changing from Cyton to Ganglion.

abelfodil and others added 30 commits September 14, 2020 15:55
Copy link
Copy Markdown
Contributor

@abelfodil abelfodil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job overall :D

Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/baseTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/baseTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/baseTransformer.dart Outdated
}

_serialPort.setPortParameters(
115200, UsbPort.DATABITS_8, UsbPort.STOPBITS_1, UsbPort.PARITY_NONE);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import 'package:polydodo/src/infrastructure/constants.dart';
import 'baseTransformer.dart';

class CytonTransformer<S, T> extends BaseTransformer<S, T> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionnel, unit test this class and ganglion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added Unit tests, not sure I'm liking the way it's done tho, Open to feedback.

Comment thread mobile/lib/src/infrastructure/connection_repositories/serial_repository.dart Outdated
Comment thread mobile/lib/src/infrastructure/connection_repositories/serial_repository.dart Outdated
Comment thread mobile/lib/src/infrastructure/connection_repositories/serial_repository.dart Outdated
Copy link
Copy Markdown
Contributor

@abelfodil abelfodil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En général faut éviter les side-effects (garder les fonctions pures), ça rend le code plus dumb et donc plus facile à suivre.

De plus, il faut favoriser les fonctions built-in plutôt que d'écrire du code soi-même. In the words of a wise man: https://github.com/kelseyhightower/nocode

Comment thread mobile/lib/src/application/device/device_selector_cubit.dart
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/ganglionTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/cytonTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/cytonTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/ganglionTransformer.dart Outdated
Comment thread mobile/lib/src/infrastructure/eeg_data_transformers/cytonTransformer.dart Outdated
@MouradLachhab MouradLachhab merged commit dbceda0 into master Oct 20, 2020
@MouradLachhab MouradLachhab deleted the serial branch October 20, 2020 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants