Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SsssSufferin’ ssssuccotash! Doxygen'ed again! #1194

Merged
merged 7 commits into from
Jun 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 13 additions & 12 deletions src/IRsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ class IRsend {
// Legacy use of this procedure was to only send a single code so call it with
// repeat=0 for backward compatibility. As of v2.0 it defaults to sending
// a Sony command that will be accepted be a device.
void sendSony(uint64_t data, uint16_t nbits = kSony20Bits,
uint16_t repeat = kSonyMinRepeat);
void sendSony38(uint64_t data, uint16_t nbits = kSony20Bits,
uint16_t repeat = kSonyMinRepeat + 1);
uint32_t encodeSony(uint16_t nbits, uint16_t command, uint16_t address,
uint16_t extended = 0);
#endif
void sendSony(const uint64_t data, const uint16_t nbits = kSony20Bits,
const uint16_t repeat = kSonyMinRepeat);
void sendSony38(const uint64_t data, const uint16_t nbits = kSony20Bits,
const uint16_t repeat = kSonyMinRepeat + 1);
uint32_t encodeSony(const uint16_t nbits, const uint16_t command,
const uint16_t address, const uint16_t extended = 0);
#endif // SEND_SONY
#if SEND_SHERWOOD
void sendSherwood(uint64_t data, uint16_t nbits = kSherwoodBits,
uint16_t repeat = kSherwoodMinRepeat);
Expand Down Expand Up @@ -290,8 +290,9 @@ class IRsend {
#endif
#if SEND_SANYO
uint64_t encodeSanyoLC7461(uint16_t address, uint8_t command);
void sendSanyoLC7461(uint64_t data, uint16_t nbits = kSanyoLC7461Bits,
uint16_t repeat = kNoRepeat);
void sendSanyoLC7461(const uint64_t data,
const uint16_t nbits = kSanyoLC7461Bits,
const uint16_t repeat = kNoRepeat);
#endif
#if SEND_DISH
// sendDISH() should typically be called with repeat=3 as DISH devices
Expand Down Expand Up @@ -657,9 +658,9 @@ class IRsend {
bool modulation;
uint32_t calcUSecPeriod(uint32_t hz, bool use_offset = true);
#if SEND_SONY
void _sendSony(uint64_t data, uint16_t nbits,
uint16_t repeat, uint16_t freq);
#endif
void _sendSony(const uint64_t data, const uint16_t nbits,
const uint16_t repeat, const uint16_t freq);
#endif // SEND_SONY
};

#endif // IRSEND_H_
11 changes: 9 additions & 2 deletions src/ir_Neoclima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,24 +321,30 @@ bool IRNeoclimaAc::getSleep(void) {
return GETBIT8(remote_state[7], kNeoclimaSleepOffset);
}

// A.k.a. Swing
/// Set the vertical swing setting of the A/C.
/// @param[in] on true, the setting is on. false, the setting is off.
void IRNeoclimaAc::setSwingV(const bool on) {
this->setButton(kNeoclimaButtonSwing);
setBits(&remote_state[7], kNeoclimaSwingVOffset, kNeoclimaSwingVSize,
on ? kNeoclimaSwingVOn : kNeoclimaSwingVOff);
}

/// Get the vertical swing setting of the A/C.
/// @return true, the setting is on. false, the setting is off.
bool IRNeoclimaAc::getSwingV(void) {
return GETBITS8(remote_state[7], kNeoclimaSwingVOffset,
kNeoclimaSwingVSize) == kNeoclimaSwingVOn;
}

// A.k.a. Air Flow
/// Set the horizontal swing setting of the A/C.
/// @param[in] on true, the setting is on. false, the setting is off.
void IRNeoclimaAc::setSwingH(const bool on) {
this->setButton(kNeoclimaButtonAirFlow);
setBit(&remote_state[7], kNeoclimaSwingHOffset, !on); // Cleared when `on`
}

/// Get the horizontal swing (Air Flow) setting of the A/C.
/// @return true, the setting is on. false, the setting is off.
bool IRNeoclimaAc::getSwingH(void) {
return !GETBIT8(remote_state[7], kNeoclimaSwingHOffset);
}
Expand Down Expand Up @@ -539,6 +545,7 @@ String IRNeoclimaAc::toString(void) {
/// raw data. Typically/Defaults to kStartOffset.
/// @param[in] nbits The number of data bits to expect.
/// @param[in] strict Flag indicating if we should perform strict matching.
/// @return True if it can decode it, false if it can't.
bool IRrecv::decodeNeoclima(decode_results *results, uint16_t offset,
const uint16_t nbits, const bool strict) {
// Compliance
Expand Down
Loading