Implement preferences panel for sensor and hub related settings
|Assignee:||Hans Cappelle||% Done:|
|Category:||FrSky Hub||Spent time:||-|
|Target version:||3.0 FrSky hub and sensors|
Some sensors need extra information. For example the rpm sensor needs nr of blades for correct rpm calculation.
refs #396 adding menu option and preferences screen and xml resources. Still need to define the settings and use them in the hub activity.
#2 Updated by Hans Cappelle over 6 years ago
might be better to wait for #306 implementation of proper Channel object use for sensor hub since there are already settings available for offset, moving average, ... Maybe add some generic calculation method for nr of blades for rpm (divide by X) or for unit conversion (multiply by Y), ...
#3 Updated by Espen Solbu over 6 years ago
if we do #306 properly, it should be possible to extend a generic Channel class with a specific channel class, i.e. FrSkyHubChannelRpm. This could add calculation methods for the pulse -> rpm calculation.
This is probably only needed for a few of the parameters. Most of the parameters should be usable with the existing Channel class without modification.
We should probably add a way to add additional "configuration" to the channel. E.g. the specific channel class could inject additional textviews, edit fields, checkboxes etc into the existing channel config activity.
For now, and for debug purposes (hub support in 2.0 and 2.5), i think the easiest solution is:
- Make Fixed channel using Channel class for this value, allow it to be used as source channel, call it e.g. RPM pulses
- Add this to Hub channel list
- Add hub's channels from channel list to channels allowed to use as source channels
- In model config add channel using "RPM pulses as source, call this "RPM", set factor on this channel to 1/<number of blades>
-> It works :)
This solution is correct according to architecture design. It will work as the particular configuration we need can be expressed by using the factor of channels. It will allow logging to CSV etc.
It will not work for more complex channels, also the configuration activity of channels, does not describe the property you are configuring well enough.
For 3.0 i think we need to support individual configurations on channels though, but we can deal with that later.
#5 Updated by Hans Cappelle over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Current view is only for debug information and overview. It has some basic properties now but I won't invest more time in this. The actual development should go into the Channel system with adapted view with settings per view (ref ticket 306)