From f71ed97aaa378b3cce37c5408f847f095a4c0046 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Sat, 20 Sep 2014 13:04:01 +0200 Subject: [PATCH] Made Time, LiquidCrystal and RealTimeClockDisplaySensor example work in Arduino IDE 1.5.7. --- libraries/LiquidCrystal/LCD.cpp | 2 +- libraries/LiquidCrystal/LCD.h | 2 +- libraries/MySensors/MyConfig.h | 2 +- .../EthernetGateway/EthernetGateway.ino | 8 ++-- libraries/Time/DateStrings.cpp | 48 +++++++++---------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/libraries/LiquidCrystal/LCD.cpp b/libraries/LiquidCrystal/LCD.cpp index f0e3068..e7af077 100644 --- a/libraries/LiquidCrystal/LCD.cpp +++ b/libraries/LiquidCrystal/LCD.cpp @@ -304,7 +304,7 @@ void LCD::createChar(uint8_t location, uint8_t charmap[]) } #ifdef __AVR__ -void LCD::createChar(uint8_t location, const prog_uchar charmap[]) +void LCD::createChar(uint8_t location, const unsigned char charmap[]) { location &= 0x7; // we only have 8 memory locations 0-7 diff --git a/libraries/LiquidCrystal/LCD.h b/libraries/LiquidCrystal/LCD.h index 126b935..9b977f4 100644 --- a/libraries/LiquidCrystal/LCD.h +++ b/libraries/LiquidCrystal/LCD.h @@ -418,7 +418,7 @@ public: (0 to 7) @param charmap[in] the bitmap array representing each row of the character. */ - void createChar(uint8_t location, const prog_uchar charmap[]); + void createChar(uint8_t location, const unsigned char charmap[]); #endif // __AVR__ /*! diff --git a/libraries/MySensors/MyConfig.h b/libraries/MySensors/MyConfig.h index 89f7198..adcb219 100644 --- a/libraries/MySensors/MyConfig.h +++ b/libraries/MySensors/MyConfig.h @@ -18,6 +18,6 @@ /*** * Enable/Disable debug logging */ -//#define DEBUG +#define DEBUG #endif diff --git a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino index 49a6065..82609c3 100644 --- a/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino +++ b/libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino @@ -42,8 +42,8 @@ * 7 Radio error LED (optional) +5V -> LED -> 270-330 Ohm resistor -> pin 7. * 6 Radio SPI Slave Select * 5 Radio Chip Enable - * 3 Inclusion mode button (optional), 10K pull down to GND, button to VCC) - * 2 Radio IRQ pin (optional), W5100 Int, if linked to pin 2) + * 3 Inclusion mode button (optional) GND-> Button -> Pin3 + * 2 Radio IRQ pin (optional) * ----------------------------------------------------------------------------------------------------------- * Powering: both NRF24l01 radio and Ethernet(ENC28J60) uses 3.3V */ @@ -58,10 +58,10 @@ // Use this if you have attached a Ethernet ENC28J60 shields -#include +//#include // Use this fo WizNET module and Arduino Ethernet Shield -//#include +#include #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled diff --git a/libraries/Time/DateStrings.cpp b/libraries/Time/DateStrings.cpp index fc6e15f..a0eef9d 100644 --- a/libraries/Time/DateStrings.cpp +++ b/libraries/Time/DateStrings.cpp @@ -15,38 +15,38 @@ static char buffer[dt_MAX_STRING_LEN+1]; // must be big enough for longest string and the terminating null -char monthStr1[] PROGMEM = "January"; -char monthStr2[] PROGMEM = "February"; -char monthStr3[] PROGMEM = "March"; -char monthStr4[] PROGMEM = "April"; -char monthStr5[] PROGMEM = "May"; -char monthStr6[] PROGMEM = "June"; -char monthStr7[] PROGMEM = "July"; -char monthStr8[] PROGMEM = "August"; -char monthStr9[] PROGMEM = "September"; -char monthStr10[] PROGMEM = "October"; -char monthStr11[] PROGMEM = "November"; -char monthStr12[] PROGMEM = "December"; +const char monthStr1[] PROGMEM = "January"; +const char monthStr2[] PROGMEM = "February"; +const char monthStr3[] PROGMEM = "March"; +const char monthStr4[] PROGMEM = "April"; +const char monthStr5[] PROGMEM = "May"; +const char monthStr6[] PROGMEM = "June"; +const char monthStr7[] PROGMEM = "July"; +const char monthStr8[] PROGMEM = "August"; +const char monthStr9[] PROGMEM = "September"; +const char monthStr10[] PROGMEM = "October"; +const char monthStr11[] PROGMEM = "November"; +const char monthStr12[] PROGMEM = "December"; -PGM_P monthNames_P[] PROGMEM = +PGM_P const monthNames_P[] PROGMEM = { "",monthStr1,monthStr2,monthStr3,monthStr4,monthStr5,monthStr6, monthStr7,monthStr8,monthStr9,monthStr10,monthStr11,monthStr12 }; -char monthShortNames_P[] PROGMEM = "ErrJanFebMarAprMayJunJulAugSepOctNovDec"; +const char monthShortNames_P[] PROGMEM = "ErrJanFebMarAprMayJunJulAugSepOctNovDec"; -char dayStr0[] PROGMEM = "Err"; -char dayStr1[] PROGMEM = "Sunday"; -char dayStr2[] PROGMEM = "Monday"; -char dayStr3[] PROGMEM = "Tuesday"; -char dayStr4[] PROGMEM = "Wednesday"; -char dayStr5[] PROGMEM = "Thursday"; -char dayStr6[] PROGMEM = "Friday"; -char dayStr7[] PROGMEM = "Saturday"; +const char dayStr0[] PROGMEM = "Err"; +const char dayStr1[] PROGMEM = "Sunday"; +const char dayStr2[] PROGMEM = "Monday"; +const char dayStr3[] PROGMEM = "Tuesday"; +const char dayStr4[] PROGMEM = "Wednesday"; +const char dayStr5[] PROGMEM = "Thursday"; +const char dayStr6[] PROGMEM = "Friday"; +const char dayStr7[] PROGMEM = "Saturday"; -PGM_P dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7}; -char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThrFriSat"; +PGM_P const dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7}; +const char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThrFriSat"; /* functions to return date strings */