]> mj.ucw.cz Git - home-hw.git/commitdiff
test-sinclair: RC comments
authorMartin Mares <mj@ucw.cz>
Fri, 14 Jul 2023 17:10:22 +0000 (19:10 +0200)
committerMartin Mares <mj@ucw.cz>
Fri, 14 Jul 2023 17:10:22 +0000 (19:10 +0200)
test-sinclair/main.c

index fc8a3705e276e5d4a650ee9d21948d595efe0e99..2c542fe0ec0669deee66a9b3eafdcc327b20b39d 100644 (file)
@@ -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 {