Add command for setting TEC polarity direction #135
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "atse/thermostat:swap_command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds new command
pwm <0/1> polarity <normal/reversed>
, which sets the direction of TEC polarity, with swapped status saved to flash and reported.See #104. Decided to not go with the mode command after all since resistive heater mode can be emulated with current limits.
If I can configure the TEC Polarity via the command
pwm <0/1> polarity_swapped <false/true>
,I would expect I can see the TEC polarity via the
pwm
cmd. But it's not.There is inconsistency in cmd and report json.
Type
pwm <0/1> polarity_swapped <false/true>
to swap polarity.But, the report json uses "current_swapped" to indicate such setting.
current_swapped
is not a good name for such setting.Also, there is missing README
report
cmd docs for this settings.state.polarity_swapped
setting is not applied when settings are loaded from flash.0940520ded
tod8e590ee9f
d8e590ee9f
to6224486662
I've changed the command to be in the format
pwm <0/1> polarity <normal/reversed>
, with thepwm
command returning the following:The README is also updated, noting where polarity reversing might be needed. The polarity setting saving/loading was also tested ok.
Add command for swapping TEC polarityto Add command for setting TEC polarity directionBut isn't it not a pwm functionality? pwm is just a way to reduce the average voltage by regulating high-freq square pulses (same as brightness regulation on OLED screens without DC-dimming).
API seems fine otherwise, just different category.
@esavkin In the case of thermostat the PWM system is able to output both positive and negative voltages.