arduino / Arduino-Science-Journal-iOS

Use the sensors in your mobile devices to perform science experiments. Science doesn’t just happen in the classroom or lab—tools like Science Journal let you see how the world works with just your phone.
http://arduino.cc/education
Apache License 2.0
22 stars 9 forks source link

Can't unselect all internal device sensors, even if an external device is connected #19

Open manuelzomer opened 4 years ago

manuelzomer commented 4 years ago

Describe the bug In the sensor settings it is not possible to unselect all internal sensors (one sensor always stays) even if an external device is connected. In comparison, the Android version lets you unselect all internal sensors as long as any external sensor of a connected device is selected.

To Reproduce Steps to reproduce the behavior:

  1. Go to the sensor settings
  2. Add an external device
  3. Select a sensor of the external device
  4. Try to unselect all internal sensors

Expected behavior As long as an external device is connected (and a sensor of this connected device is selected), it should be possible to unselect all internal sensors.

emiliopavia commented 4 years ago

@manuelzomer @VKin-Arduino we inherited this behavior from the original codebase. The given is that we cannot have the sensors tab in the experiment empty. If we want to change the current behavior there's one edge case to consider:

• the user selects an external sensor; • the user deselects all the internal sensors; • the user unpairs the BLE device.

At this point there's no selected sensor in settings. What should happen then?

manuelzomer commented 3 years ago

@emiliopavia On Android the behaviour for this edge case is, that as soon as the user unpairs the BLE device by clicking "Forget this device", the first internal sensor of the list get's selected automatically again. For consistency reasons it would be ideal to have that same behaviour for iOS as well.