Add dc_output and dc_power_out properties to C1000 (Gen 1)#37
Open
oldake wants to merge 1 commit into
Open
Conversation
The C1000 class has turn_dc_on/off control methods but no corresponding
status property, requiring callers to use the private _parse_int("b2")
directly. The C1000G2 class already defines dc_output and dc_power_out
from the same b2 parameter; this adds the same two properties to Gen 1.
Confirmed on real C1000 Gen 1 hardware (A1761, firmware 1.6.6):
b2 telemetry was 020100 with DC output on — byte 1 = 0x01 = PortStatus.OUTPUT.
Owner
|
Looks fine to me, I am happy to merge it but you need to update the docs first for the DC power out and port status so they reflect the new capability. As a side note the reason why I did not implement this for the C1000(X) originally despite owning one is because its DC output is broken, I can send the command to turn the output on and off and it does respond but it won't actually output any power, its output light just blinks then turns off after a while. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's missing
The
C1000class hasturn_dc_on()/turn_dc_off()but nodc_outputstatus property, making it impossible to read back DC output state without calling the private_parse_int("b2", ...)directly.C1000G2already definesdc_outputanddc_power_outfrom theb2telemetry parameter. This PR adds the same two properties to the Gen 1 class.Empirical confirmation
Tested on a real C1000 Gen 1 (A1761, firmware 1.6.6).
With DC output physically on, raw telemetry
b2was020100:01→PortStatus.OUTPUT✓dc_power_out(byte 2+) read0in this sample — the output was enabled but at standby with no load, so the value is plausible but not confirmed under active draw. Byte offsets mirror the Gen 2 mapping exactly.Note on Gen 2
C1000G2hasdc_output/dc_power_outbut is missingturn_dc_on/off. Those control methods exist in Gen 1 (CMD_DC_OUTPUT = "404b"). I don't have Gen 2 hardware to test, but flagging it in case someone else can confirm.