diff --git a/comms.h b/comms.h index a0f93c62..d115a959 100644 --- a/comms.h +++ b/comms.h @@ -4,6 +4,7 @@ #define vePage 1 #define ignPage 2 #define afrPage 3 +#define iacPage 4 byte currentPage; diff --git a/comms.ino b/comms.ino index 1446a5b5..9186e95d 100644 --- a/comms.ino +++ b/comms.ino @@ -283,6 +283,16 @@ void receiveValue(byte offset, byte newValue) } break; + case iacPage: //Idle Air Control settings page (Page 4) + pnt_configPage = (byte *)&configPage4; + //For some reason, TunerStudio is sending offsets greater than the maximum page size. I'm not sure if it's their bug or mine, but the fix is to only update the config page if the offset is less than the maximum size + if( offset < page_size) + { + *(pnt_configPage + byte(offset)) = newValue; + } + return; + break; + default: break; } @@ -354,6 +364,16 @@ void sendPage() //Serial.flush(); break; + case iacPage: + pnt_configPage = (byte *)&configPage4; //Create a pointer to Page 2 in memory + offset = 0; //No offset required on page 4 + for(byte x=offset; x