From: Martin Mares Date: Fri, 14 Jul 2023 17:10:22 +0000 (+0200) Subject: test-sinclair: RC comments X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=54b6abc94330d3bbde321ebb9c6c6bc0ce6d8b73;p=home-hw.git test-sinclair: RC comments --- diff --git a/test-sinclair/main.c b/test-sinclair/main.c index fc8a370..2c542fe 100644 --- a/test-sinclair/main.c +++ b/test-sinclair/main.c @@ -306,6 +306,8 @@ static void tm_show(void) * The AC unit expects demodulated IR signal. The RC sends 52-bit messages * (plus leader and trailer). The last 4 bits are a complement of checksum * of 4-bit nibbles. + * + * We represent the messages as two 32-bit words, the upper word containing */ #define RC_POWER_OFF_HI 0b00000000000000000000 @@ -313,26 +315,26 @@ static void tm_show(void) #define RC_DEFAULT_HI 0b00000011000000000000 -// Combines with a temperature setting (17-30) +// Cooling with different fan settings. Combines with a temperature setting (17-30). #define RC_COOL_AUTO 0b00000000000000010000000000000000 -#define RC_COOL_HI 0b00000000000000010000100000000000 +#define RC_COOL_HIGH 0b00000000000000010000100000000000 #define RC_COOL_MED 0b00000000000000010001000100000000 -#define RC_COOL_LO 0b00000000000000010010001000000000 +#define RC_COOL_LOW 0b00000000000000010010001000000000 static const u32 rc_cool_fan[4] = { RC_COOL_AUTO, - RC_COOL_LO, + RC_COOL_LOW, RC_COOL_MED, - RC_COOL_HI, + RC_COOL_HIGH, }; -// Combines with a temperature setting (15-25) +// Heating with fixed fan setting. Combines with a temperature setting (15-25). #define RC_WARM 0b00000000000000010000001100000000 -// This is sent with temperature=17 +// Dehumidifying with fixed fan setting. This is always sent with temperature=17. #define RC_DEHUMIDIFY 0b00000000000000010010010000000000 -// This can be added to any command to enable sleep mode, but we do not issue these yet +// This can be added to any command to enable sleep mode, but we do not issue it yet. #define RC_SLEEP 0b00000000000010000000000000000000 enum rc_mode {