-
Notifications
You must be signed in to change notification settings - Fork 4
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
base: develop
Are you sure you want to change the base?
Error dectection #16
Conversation
…based on sensor values
Please fix conflicts so we can review this. |
I feel like documentation is missing 😃 |
Documentation has been added. Hope that will help to understand the code. |
There was a problem hiding this 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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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." |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has this been done?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 addingisOutdoor : Boolean
andactivity: String
tags in the row with the inconsistent value.I'm open to discussion about if we can change it.