Skip to content

Commit 747df82

Browse files
committed
Add remote control type in toString() function
1 parent c74689d commit 747df82

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

src/IRtext.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ IRTEXT_CONST_STRING(kTimerActiveDaysStr, D_STR_TIMER_ACTIVE_DAYS);
217217
///< "TimerActiveDays"
218218
IRTEXT_CONST_STRING(kKeyStr, D_STR_KEY); ///< "Key"
219219
IRTEXT_CONST_STRING(kValueStr, D_STR_VALUE); ///< "Value"
220+
///< "Remote Control Types"
221+
IRTEXT_CONST_STRING(kRemoteControlType, D_STR_REMOTECONTROLTYPE); ///<
222+
///< "Remote Control Type"
223+
IRTEXT_CONST_STRING(kToshibaRemoteControlTypeA, D_STR_TOSHIBAREMOTETYPEA);
224+
///< "A"
225+
IRTEXT_CONST_STRING(kToshibaRemoteControlTypeB, D_STR_TOSHIBAREMOTETYPEB);
226+
///< "B"
220227

221228
// Separators & Punctuation
222229
const char kTimeSep = D_CHR_TIME_SEP; ///< ':'

src/IRtext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ extern IRTEXT_CONST_PTR(kUpStr);
238238
extern IRTEXT_CONST_PTR(kUpperStr);
239239
extern IRTEXT_CONST_PTR(kUpperMiddleStr);
240240
extern IRTEXT_CONST_PTR(kValueStr);
241+
extern IRTEXT_CONST_PTR(kRemoteControlType);
242+
extern IRTEXT_CONST_PTR(kToshibaRemoteControlTypeA);
243+
extern IRTEXT_CONST_PTR(kToshibaRemoteControlTypeB);
241244
extern IRTEXT_CONST_PTR(kV9014557AStr);
242245
extern IRTEXT_CONST_PTR(kV9014557BStr);
243246
extern IRTEXT_CONST_PTR(kVaneStr);

src/ir_Toshiba.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,16 @@ String IRToshibaAC::toString(void) const {
491491
result += addBoolToString(getEcono(), kEconoStr);
492492
result += addBoolToString(getFilter(), kFilterStr);
493493
}
494+
switch (getRemoteControl()) {
495+
case kToshibaAcRemoteA:
496+
result += addLabeledString(kToshibaRemoteControlTypeA, kRemoteControlType);
497+
break;
498+
case kToshibaAcRemoteB:
499+
result += addLabeledString(kToshibaRemoteControlTypeB, kRemoteControlType);
500+
break;
501+
default:
502+
break;
503+
}
494504
return result;
495505
}
496506

src/locale/defaults.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,15 @@ D_STR_INDIRECT " " D_STR_MODE
478478
#ifndef D_STR_VALUE
479479
#define D_STR_VALUE "Value"
480480
#endif // D_STR_VALUE
481+
#ifndef D_STR_REMOTECONTROLTYPE
482+
#define D_STR_REMOTECONTROLTYPE "Remote Control Type"
483+
#endif // D_STR_REMOTECONTROLTYPE
484+
#ifndef D_STR_TOSHIBAREMOTETYPEA
485+
#define D_STR_TOSHIBAREMOTETYPEA "A"
486+
#endif // D_STR_TOSHIBAREMOTETYPEA
487+
#ifndef D_STR_TOSHIBAREMOTETYPEB
488+
#define D_STR_TOSHIBAREMOTETYPEB "B"
489+
#endif // D_STR_TOSHIBAREMOTETYPEB
481490

482491
// Compound words/phrases/descriptions from pre-defined words.
483492
// Note: Obviously these need to be defined *after* their component words.

0 commit comments

Comments
 (0)