We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01e0a49 commit 887d9beCopy full SHA for 887d9be
libraries/Robot_Control/examples/explore/R06_Wheel_Calibration/scripts_library.h
@@ -1,14 +1,14 @@
1
#include <avr/pgmspace.h>
2
#include <ArduinoRobot.h>
3
4
-prog_char script1[] PROGMEM="Wheel Calibration\n";
5
-prog_char script2[] PROGMEM="1. Put Robot on a flat surface\n";
6
-prog_char script3[] PROGMEM="2. Adjust speed with the knob on top\n";
7
-prog_char script4[] PROGMEM="3. If robot goes straight, it's done\n";
8
-prog_char script5[] PROGMEM="4. Use screwdriver on the trim on bottom\n";
9
-prog_char script6[] PROGMEM="Robot turns left, screw it clockwise;\n";
10
-prog_char script7[] PROGMEM="Turns right, screw it ct-colockwise;\n";
11
-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";
12
13
char buffer[42];//must be longer than text
14
libraries/Robot_Control/src/Squawk.cpp
@@ -81,7 +81,7 @@ osc_t osc[4];
81
uint8_t pcm = 128;
82
83
// ProTracker period tables
84
-uint16_t period_tbl[84] PROGMEM = {
+const uint16_t period_tbl[84] PROGMEM = {
85
3424, 3232, 3048, 2880, 2712, 2560, 2416, 2280, 2152, 2032, 1920, 1814,
86
1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 907,
87
856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453,
@@ -92,7 +92,7 @@ uint16_t period_tbl[84] PROGMEM = {
92
};
93
94
// ProTracker sine table
95
-int8_t sine_tbl[32] PROGMEM = {
+const int8_t sine_tbl[32] PROGMEM = {
96
0x00, 0x0C, 0x18, 0x25, 0x30, 0x3C, 0x47, 0x51, 0x5A, 0x62, 0x6A, 0x70, 0x76, 0x7A, 0x7D, 0x7F,
97
0x7F, 0x7F, 0x7D, 0x7A, 0x76, 0x70, 0x6A, 0x62, 0x5A, 0x51, 0x47, 0x3C, 0x30, 0x25, 0x18, 0x0C,
98
@@ -598,4 +598,4 @@ void squawk_playroutine() {
598
}
599
600
lockout = false;
601
-}
+}
libraries/Robot_Control/src/SquawkSD.cpp
@@ -13,7 +13,7 @@ class StreamFile : public SquawkStream {
static StreamFile file;
15
16
-extern uint16_t period_tbl[84] PROGMEM;
+extern const uint16_t period_tbl[84] PROGMEM;
17
18
void SquawkSynthSD::play(Fat16 melody) {
19
SquawkSynth::pause();
@@ -179,4 +179,4 @@ void SquawkSynthSD::convert(Fat16 in, Fat16 out) {
179
out.write(note[2] | (sample[2] == 0 ? 0x00 : 0x80));
180
181
182
-}*/
+}*/
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,
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";
20
-PROGMEM const char *scripts_Hello_User[]={
+const char * const scripts_Hello_User[] PROGMEM = {
21
hello_user_script1,
22
hello_user_script2,
23
hello_user_script3,
@@ -48,4 +48,4 @@ void writeScript(int seq, int line, int col){
48
textManager.writeText(line,col,buffer);
49
50
51
-*/
+*/
0 commit comments