Skip to content

Commit

Permalink
retrieve_Switch accept values from display_SWITCH
Browse files Browse the repository at this point in the history
display_SWITCH prints with %02X, so retrieve_Switch ought to accept
values made of 2 nibbles too, so make retrieve_Switch call
retrieve_byte
  • Loading branch information
simonhyde committed Nov 7, 2023
1 parent ef2a29b commit 88e207e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion RFLink/4_Display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ boolean retrieve_ID(unsigned long &ul_ID)

boolean retrieve_Switch(byte &b_Switch)
{
return retrieve_nibble(b_Switch, "SWITCH=");
return retrieve_byte(b_Switch, "SWITCH=");
}

boolean retrieve_Command(byte &b_Cmd)
Expand Down
2 changes: 1 addition & 1 deletion RFLink/4_Display.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ boolean retrieve_byte(byte &, const char* = NULL); // calls retrieve_hexNumber(
boolean retrieve_nibble(byte &, const char* = NULL); // calls retrieve_hexNumber(, 1, )

boolean retrieve_ID(unsigned long &); // calls retrieve_long(, "ID=") and limits the value to 0x03FFFFFF (26 bits)
boolean retrieve_Switch(byte &); // calls retrieve_nibble(, "SWITCH=")
boolean retrieve_Switch(byte &); // calls retrieve_byte(, "SWITCH=")
boolean retrieve_Command(byte &); // calls retrieve_command(, "CMD=")

boolean retrieve_End(); // returns true if the token "pointer" is at the end of the input string
Expand Down
2 changes: 1 addition & 1 deletion RFLink/Plugins/Plugin_004.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ boolean PluginTX_004(byte function, const char *string)


bitstream = (ID_bitstream << 6); // 26 bits on top
bitstream |= Switch_bitstream; // Complete transmitted address
bitstream |= Switch_bitstream & 0xF; // Complete transmitted address
// bitstream &= 0xFFFFFFCF; // Bit 4 and 5 are left for cmd
bitstream |= (Cmd_bitstream << 4);

Expand Down

0 comments on commit 88e207e

Please sign in to comment.