kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
895 stars 124 forks source link

Call UUI deactivation callbacks when changing function via tty #178

Open kanflo opened 5 years ago

kanflo commented 5 years ago

The following will cause "litter pixels" not visible when changing using the physical controls. Most likely the deactivation callbacks are not called.

% dpsctl -d /dev/cu.usbmodemC4D0B9DA3 -f funcgen
Changed function.
% dpsctl -d /dev/cu.usbmodemC4D0B9DA3 -f cv
Changed function.
Xenoamor commented 5 years ago

I can't find this in the code at a first glance. The call tree seems to be:

handle_set_function()
opendps_enable_function_idx()
uui_set_screen()

uui_set_screen should be calling the last screens deactivation function