Updated HeatpumpIR, to a version which uses the native Arduino IDE 1.6 PROGMEM definitions

This commit is contained in:
ToniA
2015-10-01 10:39:59 +03:00
parent 1b120d7520
commit c4f706fd3e
27 changed files with 212 additions and 212 deletions
@@ -1,3 +1,5 @@
#include <Arduino.h>
#include <FujitsuHeatpumpIR.h>
#include <PanasonicCKPHeatpumpIR.h>
#include <PanasonicHeatpumpIR.h>
@@ -25,13 +27,13 @@ void setup()
void loop()
{
int i = 0;
prog_char* buf;
const char* buf;
do {
// Send the same IR command to all supported heatpumps
Serial.print(F("Sending IR to "));
buf = (prog_char*)heatpumpIR[i]->model();
buf = heatpumpIR[i]->model();
// 'model' is a PROGMEM pointer, so need to write a byte at a time
while (char modelChar = pgm_read_byte(buf++))
{
@@ -39,7 +41,7 @@ void loop()
}
Serial.print(F(", info: "));
buf = (prog_char*)heatpumpIR[i]->info();
buf = heatpumpIR[i]->info();
// 'info' is a PROGMEM pointer, so need to write a byte at a time
while (char infoChar = pgm_read_byte(buf++))
{