FrSkyRC / ETHOS-Feedback-Community

Feedback & suggestions are welcomed here for ETHOS by FrSky
188 stars 85 forks source link

lua: set sensor idle mode seems not to work (at least on horus) #1621

Closed strgaltdel closed 2 weeks ago

strgaltdel commented 2 years ago

tested on Horus X12 / 1.2.1 RC1:

Hi, my understanding is, that i should be able to use this method to set a mode. (or to get the sensor status in case no argument used, assuming this method does something like activate/deactivate the sensor in order to ensure plausible data)

But in case i try this method to "set" the mode by using boolean arguments the script returns an error. getting the mode seems to work correct

Documentation:

LuaSensor::idle() Set / unset the S.Port Sensor IDLE mode.

Since 1.1.0 Parameters state (boolean Returns result (boolean)

example see screenshots

sensorIdle src

result:

sensorIdle bug

btw i tried this method because i do poll some statistical data from sensors which are not visible as telemetry values it seems that the continuous poll / reading every 0.4 seconds, prevents display refresh from new data / starting the paint handler on a regular base. so i wanted to deactivate the sensor for some time and omit polls to give the paint handler a chance to refresh data. hoping my idea is correct

bsongis-frsky commented 1 year ago

Is this one fixed?

strgaltdel commented 1 year ago

sorry for the late answer, just read your request.

no, not fixed, just tested by using an x8r / ethos 1.4.6 / x18 & x12 appid 0x0C20, (standard rx id)

rx returns true by calling sensor:idle(), but changing mode by calling sensor:idle(false) still produces the error.

should this method work on every sensor?

btw found this behavior by chance, and no further feedback from other users seems to indicate very low importance ..

bsongis-frsky commented 5 months ago

Try calling sensor:idle(0)

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.