diff --git a/libraries/Robot_Control/examples/explore/R06_Wheel_Calibration/scripts_library.h b/libraries/Robot_Control/examples/explore/R06_Wheel_Calibration/scripts_library.h index cc5a80879..f1109d20d 100644 --- a/libraries/Robot_Control/examples/explore/R06_Wheel_Calibration/scripts_library.h +++ b/libraries/Robot_Control/examples/explore/R06_Wheel_Calibration/scripts_library.h @@ -1,14 +1,14 @@ #include #include -prog_char script1[] PROGMEM="Wheel Calibration\n"; -prog_char script2[] PROGMEM="1. Put Robot on a flat surface\n"; -prog_char script3[] PROGMEM="2. Adjust speed with the knob on top\n"; -prog_char script4[] PROGMEM="3. If robot goes straight, it's done\n"; -prog_char script5[] PROGMEM="4. Use screwdriver on the trim on bottom\n"; -prog_char script6[] PROGMEM="Robot turns left, screw it clockwise;\n"; -prog_char script7[] PROGMEM="Turns right, screw it ct-colockwise;\n"; -prog_char script8[] PROGMEM="5. Repeat 4 until going straight\n"; +const char script1[] PROGMEM="Wheel Calibration\n"; +const char script2[] PROGMEM="1. Put Robot on a flat surface\n"; +const char script3[] PROGMEM="2. Adjust speed with the knob on top\n"; +const char script4[] PROGMEM="3. If robot goes straight, it's done\n"; +const char script5[] PROGMEM="4. Use screwdriver on the trim on bottom\n"; +const char script6[] PROGMEM="Robot turns left, screw it clockwise;\n"; +const char script7[] PROGMEM="Turns right, screw it ct-colockwise;\n"; +const char script8[] PROGMEM="5. Repeat 4 until going straight\n"; char buffer[42];//must be longer than text diff --git a/libraries/Robot_Control/src/Squawk.cpp b/libraries/Robot_Control/src/Squawk.cpp index 5b39ebea1..55b6b995c 100644 --- a/libraries/Robot_Control/src/Squawk.cpp +++ b/libraries/Robot_Control/src/Squawk.cpp @@ -81,7 +81,7 @@ osc_t osc[4]; uint8_t pcm = 128; // ProTracker period tables -uint16_t period_tbl[84] PROGMEM = { +const uint16_t period_tbl[84] PROGMEM = { 3424, 3232, 3048, 2880, 2712, 2560, 2416, 2280, 2152, 2032, 1920, 1814, 1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 907, 856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453, @@ -92,7 +92,7 @@ uint16_t period_tbl[84] PROGMEM = { }; // ProTracker sine table -int8_t sine_tbl[32] PROGMEM = { +const int8_t sine_tbl[32] PROGMEM = { 0x00, 0x0C, 0x18, 0x25, 0x30, 0x3C, 0x47, 0x51, 0x5A, 0x62, 0x6A, 0x70, 0x76, 0x7A, 0x7D, 0x7F, 0x7F, 0x7F, 0x7D, 0x7A, 0x76, 0x70, 0x6A, 0x62, 0x5A, 0x51, 0x47, 0x3C, 0x30, 0x25, 0x18, 0x0C, }; @@ -598,4 +598,4 @@ void squawk_playroutine() { } lockout = false; -} \ No newline at end of file +} diff --git a/libraries/Robot_Control/src/SquawkSD.cpp b/libraries/Robot_Control/src/SquawkSD.cpp index 3c97ef43a..336c9a366 100644 --- a/libraries/Robot_Control/src/SquawkSD.cpp +++ b/libraries/Robot_Control/src/SquawkSD.cpp @@ -13,7 +13,7 @@ class StreamFile : public SquawkStream { static StreamFile file; -extern uint16_t period_tbl[84] PROGMEM; +extern const uint16_t period_tbl[84] PROGMEM; void SquawkSynthSD::play(Fat16 melody) { SquawkSynth::pause(); @@ -179,4 +179,4 @@ void SquawkSynthSD::convert(Fat16 in, Fat16 out) { out.write(note[2] | (sample[2] == 0 ? 0x00 : 0x80)); } } -}*/ \ No newline at end of file +}*/ diff --git a/libraries/Robot_Control/src/glcdfont.c b/libraries/Robot_Control/src/glcdfont.c index abc36317e..31017308a 100644 --- a/libraries/Robot_Control/src/glcdfont.c +++ b/libraries/Robot_Control/src/glcdfont.c @@ -6,8 +6,8 @@ // standard ascii 5x7 font -static unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, diff --git a/libraries/Robot_Control/src/utility/scripts_Hello_User.h b/libraries/Robot_Control/src/utility/scripts_Hello_User.h index 29f085f1c..ba1ef5a45 100644 --- a/libraries/Robot_Control/src/utility/scripts_Hello_User.h +++ b/libraries/Robot_Control/src/utility/scripts_Hello_User.h @@ -4,20 +4,20 @@ //as the ram of Arduino is very tiny, keeping too many string in it //can kill the program -prog_char hello_user_script1[] PROGMEM="What's your name?"; -prog_char hello_user_script2[] PROGMEM="Give me a name!"; -prog_char hello_user_script3[] PROGMEM="And the country?"; -prog_char hello_user_script4[] PROGMEM="The city you're in?"; -prog_char hello_user_script5[] PROGMEM=" Plug me to\n\n your computer\n\n and start coding!"; +const char hello_user_script1[] PROGMEM="What's your name?"; +const char hello_user_script2[] PROGMEM="Give me a name!"; +const char hello_user_script3[] PROGMEM="And the country?"; +const char hello_user_script4[] PROGMEM="The city you're in?"; +const char hello_user_script5[] PROGMEM=" Plug me to\n\n your computer\n\n and start coding!"; -prog_char hello_user_script6[] PROGMEM=" Hello User!\n\n It's me, your robot\n\n I'm alive! <3"; -prog_char hello_user_script7[] PROGMEM=" First I need some\n\n input from you!"; -prog_char hello_user_script8[] PROGMEM=" Use the knob\n\n to select letters"; -prog_char hello_user_script9[] PROGMEM=" Use L/R button\n\n to move the cursor,\n\n middle to confirm"; -prog_char hello_user_script10[] PROGMEM=" Press middle key\n to continue..."; -prog_char hello_user_script11[] PROGMEM=" Choose \"enter\" to\n\n finish the input"; +const char hello_user_script6[] PROGMEM=" Hello User!\n\n It's me, your robot\n\n I'm alive! <3"; +const char hello_user_script7[] PROGMEM=" First I need some\n\n input from you!"; +const char hello_user_script8[] PROGMEM=" Use the knob\n\n to select letters"; +const char hello_user_script9[] PROGMEM=" Use L/R button\n\n to move the cursor,\n\n middle to confirm"; +const char hello_user_script10[] PROGMEM=" Press middle key\n to continue..."; +const char hello_user_script11[] PROGMEM=" Choose \"enter\" to\n\n finish the input"; -PROGMEM const char *scripts_Hello_User[]={ +const char * const scripts_Hello_User[] PROGMEM = { hello_user_script1, hello_user_script2, hello_user_script3, @@ -48,4 +48,4 @@ void writeScript(int seq, int line, int col){ textManager.writeText(line,col,buffer); } -*/ \ No newline at end of file +*/