-
Notifications
You must be signed in to change notification settings - Fork 815
feat: created alert box for barometer and changed the file name #1340
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
feat: created alert box for barometer and changed the file name #1340
Conversation
app/src/main/res/values/strings.xml
Outdated
| <string name="barometer_description">Measures the pressure of the atmosphere</string> | ||
| <string name="barometer">Barometer</string> | ||
| <string name="barometer_alert_title">Sensor Not Present</string> | ||
| <string name="barometer_alert_description">Atmospheric pressure sensor is not present in your device, you need to use external sensor with PSLab for barometer</string> |
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.
Shall we use A barometer instead of Atmospheric pressure sensor?
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.
Can we have external sensor with PSLab for barometer to work. instead of external sensor with PSLab for barometer?
| .setPositiveButton("ok", new DialogInterface.OnClickListener() { | ||
| @Override | ||
| public void onClick(DialogInterface dialog, int which) { | ||
|
|
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.
Also do some refactoring here
app/src/main/res/values/strings.xml
Outdated
| <string name="barometer_description">Measures the pressure of the atmosphere</string> | ||
| <string name="barometer">Barometer</string> | ||
| <string name="barometer_alert_title">Sensor Not Present</string> | ||
| <string name="barometer_alert_description">Atmospheric pressure sensor is not present in your device, you need to use external sensor with PSLab for barometer</string> |
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.
Can we have external sensor with PSLab for barometer to work. instead of external sensor with PSLab for barometer?
|
@CloudyPadmal Changes done 👍 , @yatri1609 I think mentioning PSLab will make sense to the users. What do you think about this @CloudyPadmal . |
|
@CloudyPadmal @harsh-2711 @Avjeet @yatri1609 Please review |
app/src/main/res/values/strings.xml
Outdated
|
|
||
| <string name="barometer">Barometer</string> | ||
| <string name="barometer_alert_title">Sensor Not Present</string> | ||
| <string name="barometer_alert_description">Barometer sensor is not present in your device, you need to use external sensor with PSLab for barometer</string> |
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 about;
you need to use an external sensor (BMP180) with PSLab to use this instrument
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.
Yes I think it makes more sense.
|
@CloudyPadmal Changes done 👍 |
|
@CloudyPadmal @harsh-2711 @Avjeet Please review asap |
app/src/main/res/values/strings.xml
Outdated
|
|
||
| <string name="barometer">Barometer</string> | ||
| <string name="barometer_alert_title">Sensor Not Present</string> | ||
| <string name="barometer_alert_description">Barometer sensor is not present in your device, you need to use external sensor(BMP180) with PSLab for barometer</string> |
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.
This line isn't proper. You could rather use
"Barometer sensor is not present in your device. Please connect an external sensor(BMP180) with the PSLab I2C pin for using Barometer instrument"
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.
Sure @harsh-2711 , I will make the change:+1
|
@harsh-2711 Changes done, please review 👍 |
|
@Avjeet Too lengthy. No barometer sensor is detected. -line break- Connect an external sensor (BMP180) to I2C pin on PSLab.. Centralise and justify the text |
|
@abhinavraj23 also, what's the priority for this instrument? If both phone and PSLab have the sensors, from which device will it take the readings from? |
|
@cweitat currently it is only implemented by mobile sensors and and not through external sensor as there are issues in i2c communication library. But very few devices have pressure sensors(it is not common) so we should add the alert-box as the user can get confuse |
|
@abhinavraj23 so which means by default the alert box will appear?
Because if the phone has the sensor then this alert box won't show. This alert box only shown when no sensor is found. |
|
In those devices in which the mobile sensor is not present ( i.e in most of the devices). But not adding the alert-box will make an impression on the users that the app itself is not working, which is not true as the app is working fine for the mobile sensors. |
|
@abhinavraj23 I'm not saying to remove the alert box. I'm saying that the alert box won't show if there is a mobile or external sensor detected. |
|
@cweitat if we just display
Then the user will not get the understanding that the mobile sensor is not present in his device. Will that be okay? |
|
Then this
|
|
@cweitat Changes done please review 👍 |
|
Justify the text
|
|
Changes done @cweitat. Please review 👍 |
app/src/main/res/values/strings.xml
Outdated
|
|
||
| <string name="barometer">Barometer</string> | ||
| <string name="barometer_alert_title">No barometer sensor in device</string> | ||
| <string name="barometer_alert_description">Connect a BMP180 sensor to I2C pin on PSLab to use this instrument</string> |
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.
Connect a BMP180 sensor using I2C pins on PSLab to use this instrument
|
@CloudyPadmal changes done please review 👍 |
CloudyPadmal
left a comment
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.
Nice


Fixes #1337
Changes:
Added the alert-box for pressure sensor in barometer and changed the file name from Barometer_activity to BarometerActivity
Screenshot/s for the changes: [Add screenshot/s of the layout where you made changes or a

*.gifcontaining a demonstration]Checklist: [Please tick following check boxes with
[x]if the respective task is completed]strings.xml,dimens.xmlandcolors.xmlwithout hard-coding themstrings.xml,dimens.xmlorcolors.xmlAPK for testing: [Compress the
app-debug.apkfile into a<feature>.raror<feature>.zipfile and upload it here]barometer.apk.zip