Skip to content

Commit 97abbd7

Browse files
committed
Removing BYTE keyword (use Serial.write() instead).
1 parent 3eae87a commit 97abbd7

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

app/src/processing/app/debug/Compiler.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,13 @@ public void message(String s) {
367367
e = new RunnerException("Please import the SPI library from the Sketch > Import Library menu.");
368368
s += "\nAs of Arduino 0019, the Ethernet library depends on the SPI library." +
369369
"\nYou appear to be using it or another library that depends on the SPI library.";
370-
}
370+
}
371+
372+
if (pieces[3].trim().equals("'BYTE' was not declared in this scope")) {
373+
e = new RunnerException("The 'BYTE' keyword is no longer supported.");
374+
s += "\nAs of Arduino 1.0, the 'BYTE' keyword is no longer supported." +
375+
"\nPlease use Serial.write() instead.";
376+
}
371377

372378
if (exception == null && e != null) {
373379
exception = e;

build/shared/lib/keywords.txt

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ DEC LITERAL1 Serial_Print
88
BIN LITERAL1 Serial_Print
99
HEX LITERAL1 Serial_Print
1010
OCT LITERAL1 Serial_Print
11-
BYTE LITERAL1 Serial_Print
1211
PI LITERAL1
1312
HALF_PI LITERAL1
1413
TWO_PI LITERAL1

hardware/arduino/cores/arduino/Print.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ void Print::print(const char str[])
5555
write(str);
5656
}
5757

58-
void Print::print(char c, int base)
58+
void Print::print(char c)
5959
{
60-
print((long) c, base);
60+
write(c);
6161
}
6262

6363
void Print::print(unsigned char b, int base)
@@ -119,9 +119,9 @@ void Print::println(const char c[])
119119
println();
120120
}
121121

122-
void Print::println(char c, int base)
122+
void Print::println(char c)
123123
{
124-
print(c, base);
124+
print(c);
125125
println();
126126
}
127127

hardware/arduino/cores/arduino/Print.h

+4-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#define HEX 16
3030
#define OCT 8
3131
#define BIN 2
32-
#define BYTE 0
3332

3433
class Print
3534
{
@@ -43,8 +42,8 @@ class Print
4342

4443
void print(const String &);
4544
void print(const char[]);
46-
void print(char, int = BYTE);
47-
void print(unsigned char, int = BYTE);
45+
void print(char);
46+
void print(unsigned char, int = DEC);
4847
void print(int, int = DEC);
4948
void print(unsigned int, int = DEC);
5049
void print(long, int = DEC);
@@ -53,8 +52,8 @@ class Print
5352

5453
void println(const String &s);
5554
void println(const char[]);
56-
void println(char, int = BYTE);
57-
void println(unsigned char, int = BYTE);
55+
void println(char);
56+
void println(unsigned char, int = DEC);
5857
void println(int, int = DEC);
5958
void println(unsigned int, int = DEC);
6059
void println(long, int = DEC);

0 commit comments

Comments
 (0)