I'm utilising the ODBuino project here, GitHub - Magister54/opengauge: Automatically exported from code.google.com/p/opengauge
To rewrite to use it for a similar but different protocol purpose.
I know the code for that compiles fine on Arduino 0022 as I did have it working there previously.
The compiler in 1.0.1 is throwing a heap of errors mainly due to the PROGMEM prog_char deprecation that's occurred.
I've gone through and modified the lines such as line 759:
prog_char pctd[] PROGMEM="- %d + "; // used in a couple of place
Becomes:
const char pctd[] PROGMEM = "- %d + "; // used in a couple of place
I get problems like this:
prog_char select_no[] PROGMEM="(NO) YES "; // for config menu
prog_char select_yes[] PROGMEM=" NO (YES)"; // for config menu
Changed to:
const char select_no[] PROGMEM = "(NO) YES "; // for config menu
const char select_yes[] PROGMEM = " NO (YES)"; // for config menu
Gives an error from function menu_select_yes_no, which is programmed as:
byte menu_select_yes_no(byte p)
{
boolean exitMenu = false;
// set value with left/right and set with middle
exitMenu = delay_reset_button(); // make sure to clear button
do
{
if(LEFT_BUTTON_PRESSED)
p=0;
else if(RIGHT_BUTTON_PRESSED)
p=1;
else if(MIDDLE_BUTTON_PRESSED)
exitMenu = true;
lcd.setCursor(4,1);
if(p==0)
lcd_print_P(select_no);
else
lcd_print_P(select_yes);
exitMenu |= delay_reset_button();
}
while(!MIDDLE_BUTTON_PRESSED && !exitMenu);
return p;
}
The error given is 'invalid conversion from const char* to char*' - this would relate to the lcd_print_P line, which takes the const char "select_yes" and prints to LCD.
void lcd_print_P(char *string)
{
char c;
while( (c = pgm_read_byte(string++)) )
lcd.write(c);
}
I think the problem is actually the code - lcd_print_P gets a ? pointer? to a string and needs to read it?