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

Display for New Sensor Configuration (data_run) #27

Open
smitmad9 opened this issue Aug 17, 2020 · 1 comment
Open

Display for New Sensor Configuration (data_run) #27

smitmad9 opened this issue Aug 17, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@smitmad9
Copy link
Collaborator

Describe the bug
If the user adds or removes a sensor/module from a Device, the display is only correct for the columns before the change.

Expected behavior
There should be a unique table for each unique configuration (data_run) for that Device.

Hardware in Use
None, using Postman to test.

To Reproduce
Steps to reproduce the behavior:

  1. Log data to Spool with at least one module.
  2. Add or remove a sensor/module.
  3. Log data to Spool with the new configuration
  4. Go to the appropriate Network -> Device

Screenshots
Here, I first logged with all modules shown in the columns. I then deleted the TSL module and logged data again.
Screen Shot 2020-08-16 at 6 01 24 PM

Desktop (please complete the following information):

  • OS: macOS 10.15.6
  • Browser: Chrome

Code
In the Arduino IDE while editing the main.ino, goto 'Edit' -> 'Copy for HTML' and paste the output of that here.
N/A

Config
In the Arduino IDE while editing the config.json, goto 'Edit' -> 'Copy for HTML' and paste the output of that here.
N/A

Additional context
Fix: Default data_run for a Device is set to 0. Each attempt to log data, check if the configuration of modules is the same as any previous data_run. Loop through from 0 to the greatest data_run (need to track num_configs for each Device) to compare the current device's configuration with each configuration before it. If it matches with any prior data_run, set the current device's data_run. Otherwise, increment the data_run to one greater than the greatest data_run. For the data display, display a table for each data_run.

@smitmad9 smitmad9 added the bug Something isn't working label Aug 17, 2020
@smitmad9 smitmad9 self-assigned this Aug 17, 2020
@smitmad9
Copy link
Collaborator Author

Update: Goal is now to use the first data_run schema (plus any module-key pairs which correspond to other data_runs) to select the column headers, which will be constant/static and displayed for every data point for that device. Display "null" or "X" if sensors are removed/missing for any data point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant