Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error dectection #16

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

RyanIkhlef
Copy link
Contributor

I'm not satisfied about the _sendReport method in InconsistentView because I have the feeling that we cannot update data with InfluxDB API but only overwite them. That what I choosed to do by adding isOutdoor : Boolean and activity: String tags in the row with the inconsistent value.
I'm open to discussion about if we can change it.

@Alystrasz
Copy link
Member

Please fix conflicts so we can review this.

@Alystrasz Alystrasz self-requested a review February 21, 2022 15:36
@RyanIkhlef RyanIkhlef marked this pull request as ready for review February 22, 2022 10:50
@Alystrasz Alystrasz self-assigned this Feb 22, 2022
@Alystrasz
Copy link
Member

I feel like documentation is missing 😃

@RyanIkhlef
Copy link
Contributor Author

Documentation has been added. Hope that will help to understand the code.

Copy link
Member

@Alystrasz Alystrasz left a comment

Choose a reason for hiding this comment

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

You should fix typos in translations.

@@ -68,6 +68,14 @@
"name": "Exposure notifications (danger)",
"description": "Get alerts when current PM values are above danger thresholds."
},
"informationChannel": {
"name": "Exposure notifications (inconsistent)",
"description": "Gets alerts when current PM values seems inconsistent in order to contextualize your situation."
Copy link
Member

Choose a reason for hiding this comment

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

"Get alerts when current PM values seem inconsistent in order to contextualize your situation."

},
"errorChannel": {
"name": "Error notifications",
"description": "Gets alerts when we detect an error in your sensor values."
Copy link
Member

Choose a reason for hiding this comment

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

"Get alerts when we detect errors in your sensor values."

},
"error": {
"title": "Error for {}",
"body": "Sensor send an error value. If this happens again, have your sensor checked."
Copy link
Member

Choose a reason for hiding this comment

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

"Sensor sent an error value. If this happens again, please have your sensor checked."

@@ -68,6 +68,14 @@
"name": "Notifications d'exposition (danger)",
"description": "Recevez des notifications lorsque les taux de particules fines dépassent les seuils de danger définis dans l'application."
},
"informationChannel": {
"name": "Notifications d'exposition (incohérente)",
"description": "Recevez des notifications lorsque le taux de particule fines semblent incohérent afin de contextualiser votre situation."
Copy link
Member

Choose a reason for hiding this comment

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

"Recevez des notifications lorsque le taux de particules fines semble incohérent afin de contextualiser votre situation."

},
"errorChannel": {
"name": "Notifications d'erreur",
"description": "Recevez des notifications lorsque nous détéctons une erreur dans les valeurs renvoyées par votre capteur."
Copy link
Member

Choose a reason for hiding this comment

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

"Recevez des notifications lorsque nous détectons une erreur dans les valeurs renvoyées par votre capteur."

},
"error": {
"title": "Erreur : {}",
"body": "Votre capteur à envoyer une valeur négative. Si cela se reproduit, faites verifier votre capteur."
Copy link
Member

Choose a reason for hiding this comment

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

"Votre capteur a envoyé une valeur négative. Si cela se reproduit, veuillez faire vérifier votre capteur."

import 'package:easy_localization/easy_localization.dart';

/// Enum that represents indoors user actions
/// TODO complete with the Jérôme's list (see meeting of 21/01/2022)
Copy link
Member

Choose a reason for hiding this comment

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

Has this been done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I didn't get the list.

Copy link
Member

Choose a reason for hiding this comment

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

It's not too late to send Jérôme an email :)

@@ -168,20 +191,41 @@ class _SensorViewState extends State<SensorView> {
List<int> userThresholds = widget.ucS.userConf.getThresholds(value);
int warningThreshold = userThresholds[0];
int dangerThreshold = userThresholds[1];
if(widget.ucS.userConf.showWarningNotifications && SensorSendNegativeValue().isSatisfiedBy(collectedValue)) { // send notification if negative value is detected
Copy link
Member

Choose a reason for hiding this comment

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

How can I test this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't have negative value with my sensor but apparently, it's possible to have it when you put your sensor above a tea cup or coffee for example.
If you to be sure that class works you can see tests

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I saw your tests; I'd like to be able to display inconsistency report form from a test.

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