Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
db02a5c
BOSCH144: Add IRac class support
NicoThien Jul 18, 2022
407f445
Update IRac.cpp
NicoThien Jul 18, 2022
b352e91
Update IRac.cpp
NicoThien Jul 19, 2022
b53f9d0
Update ir_Bosch.h
NicoThien Jul 19, 2022
392dcec
Update ir_Bosch.h
NicoThien Jul 19, 2022
7d0aee5
Update and rename src/ir_Bosch.h to Quelle/ir_Bosch.h
NicoThien Jul 19, 2022
c42af88
Rename Quelle/ir_Bosch.h to src/ir_Bosch.h
NicoThien Jul 19, 2022
25504b0
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
3f9976b
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
7e68176
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
b2be8e0
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
63ba1f2
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
23799e9
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
cfe77e2
Update ir_Bosch.cpp
NicoThien Jul 19, 2022
871eaf0
Update ir_Bosch.cpp
NicoThien Jul 20, 2022
4850d29
Update ir_Bosch_test.cpp
NicoThien Jul 20, 2022
bf8a63f
Update ir_Bosch_test.cpp
NicoThien Jul 20, 2022
600ee91
Update ir_Bosch_test.cpp
NicoThien Jul 20, 2022
b613652
Update ir_Bosch_test.cpp
NicoThien Jul 20, 2022
cd1b9e7
Edit Test
NicoThien Jul 21, 2022
a190b3c
Add files via upload
NicoThien Jul 21, 2022
a8a8d52
Add files via upload
NicoThien Jul 21, 2022
6bd484f
Add files via upload
NicoThien Jul 21, 2022
cc16b0c
Update ir_Bosch.cpp
NicoThien Jul 21, 2022
edbfb61
Update ir_Bosch.h
NicoThien Jul 22, 2022
b5696c8
Update ir_Bosch.cpp
NicoThien Jul 22, 2022
8b945ce
Update ir_Bosch.cpp
NicoThien Jul 22, 2022
c9dde47
Update src/ir_Bosch.cpp
NicoThien Aug 5, 2022
f052cdb
Update ir_Bosch.cpp
NicoThien Aug 5, 2022
768aa33
Add files via upload
NicoThien Aug 8, 2022
ebac3f7
Update ir_Bosch.cpp
NicoThien Aug 8, 2022
5a6db72
Update ir_Bosch.h
NicoThien Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions src/IRac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "ir_Airwell.h"
#include "ir_Amcor.h"
#include "ir_Argo.h"
#include "ir_Bosch.h"
#include "ir_Carrier.h"
#include "ir_Coolix.h"
#include "ir_Corona.h"
Expand Down Expand Up @@ -161,6 +162,9 @@ bool IRac::isProtocolSupported(const decode_type_t protocol) {
#if SEND_ARGO
case decode_type_t::ARGO:
#endif
#if SEND_BOSCH144
case decode_type_t::BOSCH144:
#endif
#if SEND_CARRIER_AC64
case decode_type_t::CARRIER_AC64:
#endif // SEND_CARRIER_AC64
Expand Down Expand Up @@ -459,6 +463,47 @@ void IRac::argo(IRArgoAC *ac,
}
#endif // SEND_ARGO

#if SEND_BOSCH144
/// Send a Bosch144 A/C message with the supplied settings.
/// @note May result in multiple messages being sent.
/// @param[in, out] ac A Ptr to an IRBosch144AC object to use.
/// @param[in] on The power setting.
/// @param[in] mode The operation mode setting.
/// @param[in] degrees The temperature setting in degrees.
/// @param[in] fan The speed setting for the fan.
/// @param[in] quiet Run the device in quiet/silent mode.
/// @note -1 is Off, >= 0 is on.
void IRac::bosch144(IRBosch144AC *ac,
const bool on, const stdAc::opmode_t mode,
const float degrees, const stdAc::fanspeed_t fan,
const bool quiet) {
ac->begin();
ac->setPower(on);
if (!on) {
// after turn off AC no more commands should
// be accepted
ac->send();
return;
}
ac->setTemp(degrees);
ac->setFan(ac->convertFan(fan));
ac->setMode(ac->convertMode(mode));
ac->setQuiet(quiet);
ac->send(); // Send the state, which will also power on the unit.
// The following are all options/settings that create their own special
// messages. Often they only make sense to be sent after the unit is turned
// on. For instance, assuming a person wants to have the a/c on and in turbo
// mode. If we send the turbo message, it is ignored if the unit is off.
// Hence we send the special mode/setting messages after a normal message
// which will turn on the device.
// No Filter setting available.
// No Beep setting available.
// No Clock setting available.
// No Econo setting available.
// No Sleep setting available.
}
#endif // SEND_BOSCH144

#if SEND_CARRIER_AC64
/// Send a Carrier 64-bit A/C message with the supplied settings.
/// @param[in, out] ac A Ptr to an IRCarrierAc64 object to use.
Expand Down Expand Up @@ -2759,6 +2804,14 @@ bool IRac::sendAc(const stdAc::state_t desired, const stdAc::state_t *prev) {
break;
}
#endif // SEND_ARGO
#if SEND_BOSCH144
case BOSCH144:
{
IRBosch144AC ac(_pin, _inverted, _modulation);
bosch144(&ac, send.power, send.mode, degC, send.fanspeed, send.quiet);
break;
}
#endif // SEND_BOSCH144
#if SEND_CARRIER_AC64
case CARRIER_AC64:
{
Expand Down Expand Up @@ -3686,6 +3739,13 @@ namespace IRAcUtils {
return ac.toString();
}
#endif // DECODE_ARGO
#if DECODE_BOSCH144
case decode_type_t::BOSCH144: {
IRBosch144AC ac(kGpioUnused);
ac.setRaw(result->state);
return ac.toString();
}
#endif // DECODE_BOSCH144
#if DECODE_CARRIER_AC64
case decode_type_t::CARRIER_AC64: {
IRCarrierAc64 ac(kGpioUnused);
Expand Down Expand Up @@ -4135,6 +4195,14 @@ namespace IRAcUtils {
break;
}
#endif // DECODE_ARGO
#if DECODE_BOSCH144
case decode_type_t::BOSCH144: {
IRBosch144AC ac(kGpioUnused);
ac.setRaw(decode->state);
*result = ac.toCommon();
break;
}
#endif // DECODE_BOSCH144
#if DECODE_CARRIER_AC64
case decode_type_t::CARRIER_AC64: {
IRCarrierAc64 ac(kGpioUnused);
Expand Down
7 changes: 7 additions & 0 deletions src/IRac.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "ir_Airwell.h"
#include "ir_Amcor.h"
#include "ir_Argo.h"
#include "ir_Bosch.h"
#include "ir_Carrier.h"
#include "ir_Coolix.h"
#include "ir_Corona.h"
Expand Down Expand Up @@ -134,6 +135,12 @@ class IRac {
const stdAc::fanspeed_t fan, const stdAc::swingv_t swingv,
const bool turbo, const int16_t sleep = -1);
#endif // SEND_ARGO
#if SEND_BOSCH144
void bosch144(IRBosch144AC *ac,
const bool on, const stdAc::opmode_t mode, const float degrees,
const stdAc::fanspeed_t fan,
const bool quiet);
#endif // SEND_COOLIX
#if SEND_CARRIER_AC64
void carrier64(IRCarrierAc64 *ac,
const bool on, const stdAc::opmode_t mode,
Expand Down
Loading