I reworked the second patch in this series to add generic monitor commands
to change the temperature reported from thermometers. 
Thermometer devices can now include "sensor.h" and call 
'qemu_add_therm_temp_handler'
to register themselves.

I went with separate 'therm_set DEVICE_INDEX' and 'therm_temp TEMPERATURE' 
commands
since a 'therm_temp' command that only requires one argument seems easier
to use on the monitor command line and doesn't require searching the
list of thermometers repeatedly.

To cater to my original "driver tutorial" use case,
by default the temperature would still automatically increment unless
the 'controlled_by_monitor' qdev property is set.
Even when auto incrementing the temperature is now always bounded between 25C ~ 
40C.
(previously the temperature would increment until int16_t overflows)


Reply via email to