From 8b93f89ca1aa780a1e7702b08eb8ba38abe528b1 Mon Sep 17 00:00:00 2001 From: Darren Jeacocke Date: Sat, 19 Oct 2019 22:15:40 +1000 Subject: [PATCH] Add Fujitsu air direction methods --- FujitsuHeatpumpIR.cpp | 25 +++++++++++++++---------- FujitsuHeatpumpIR.h | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/FujitsuHeatpumpIR.cpp b/FujitsuHeatpumpIR.cpp index 4830152..a472e64 100644 --- a/FujitsuHeatpumpIR.cpp +++ b/FujitsuHeatpumpIR.cpp @@ -104,15 +104,6 @@ void FujitsuHeatpumpIR::sendFujitsu(IRSender& IR, uint8_t operatingMode, uint8_t uint8_t OFF_msg[] = { 0x14, 0x63, 0x00, 0x10, 0x10, 0x02, 0xFD }; uint8_t checksum = 0x00; -/* - - Fujitsu does not have codes to set the air direction to any specific position, but just go to the next position: - - uint8_t nextVerticalPosition_msg[] = { 0x14, 0x63, 0x00, 0x10, 0x10, 0x6C, 0x93 }; - uint8_t nextHorizontalPosition_msg[] = { 0x14, 0x63, 0x00, 0x10, 0x10, 0x79,0x86 }; - - These would need to be sent separately... -*/ // Set the operatingmode on the template message FujitsuTemplate[9] = operatingMode; @@ -204,6 +195,20 @@ void FujitsuHeatpumpIR::sendFujitsuSuperQuiet(IRSender& IR) sendFujitsuMsg(IR, sizeof(SuperQuiet_msg), SuperQuiet_msg); } +void FujitsuHeatpumpIR::sendNextVerticalPosition(IRSender& IR) +{ + uint8_t NextVerticalPosition_msg[] = { 0x14, 0x63, 0x00, 0x10, 0x10, 0x6C, 0x93 }; + + sendFujitsuMsg(IR, sizeof(NextVerticalPosition_msg), NextVerticalPosition_msg); +} + +void FujitsuHeatpumpIR::sendNextHorizontalPosition(IRSender& IR) +{ + uint8_t NextHorizontalPosition_msg[] = { 0x14, 0x63, 0x00, 0x10, 0x10, 0x79, 0x86 }; + + sendFujitsuMsg(IR, sizeof(NextHorizontalPosition_msg), NextHorizontalPosition_msg); +} + void FujitsuHeatpumpIR::sendFujitsuTestRun(IRSender& IR) { @@ -230,4 +235,4 @@ void FujitsuHeatpumpIR::sendFujitsuMsg(IRSender& IR, uint8_t msgSize, uint8_t *m // End mark IR.mark(FUJITSU_AIRCON1_BIT_MARK); IR.space(0); -} \ No newline at end of file +} diff --git a/FujitsuHeatpumpIR.h b/FujitsuHeatpumpIR.h index f10f716..057b60b 100644 --- a/FujitsuHeatpumpIR.h +++ b/FujitsuHeatpumpIR.h @@ -49,6 +49,8 @@ class FujitsuHeatpumpIR : public HeatpumpIR void sendFujitsuSwingOn(IRSender& IR); void sendFujitsuFilterClean(IRSender& IR); void sendFujitsuSuperQuiet(IRSender& IR); + void sendNextVerticalPosition(IRSender& IR); + void sendNextHorizontalPosition(IRSender& IR); void sendFujitsuTestRun(IRSender& IR); private: