Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: pancake.cpp
- Revision:
- 2:a711a6feb092
- Parent:
- 1:2eaa0fea479c
- Child:
- 3:65314d2d33bb
diff -r 2eaa0fea479c -r a711a6feb092 pancake.cpp
--- a/pancake.cpp Sat Nov 28 16:06:07 2015 +0000
+++ b/pancake.cpp Sat Nov 28 16:33:24 2015 +0000
@@ -33,7 +33,7 @@
for(uint8_t i= 4;i < scoreSize + 4;i++){
data[i] = score[i - 4];
}
- data[scoreSize +4] = 0xFF;
+ data[scoreSize +4] = 0xff;
sendCommand(data,scoreSize + 5);
}
@@ -47,11 +47,23 @@
sendCommand(data,2);
}
- void Pancake::writeLine(uint8_t sx,uint8_t sy,uint8_t ex,uint8_t ey,
+void Pancake::clearScreen(P_Color color){
+ uint8_t data[2] = {0x00,uint8_t(color)};
+ sendCommand(data,2);
+ }
+
+void Pancake::writeLine(uint8_t sx,uint8_t sy,uint8_t ex,uint8_t ey,
P_Color color){
uint8_t data[6] = {0x01,sx,sy,ex,ey,uint8_t(color)};
sendCommand(data,6);
- }
+ }
+
+void Pancake::writeCircle(uint8_t centerx,uint8_t centery,uint8_t radius,P_Color color){
+ uint8_t data[5] = {0x0e,centerx,centery,radius,uint8_t(color)};
+ sendCommand(data,5);
+ }
+
+
void Pancake::sendCommand(uint8_t data[],uint8_t length)