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.
Dependencies: mbed mbed-rtos 4DGL-uLCD-SE RPCInterface
Diff: main.cpp
- Revision:
- 17:8d33d5305d26
- Parent:
- 16:f4749ef7baa7
- Child:
- 18:d58ce903471a
--- a/main.cpp Fri Dec 06 18:40:27 2019 +0000
+++ b/main.cpp Sat Dec 07 16:43:42 2019 +0000
@@ -210,19 +210,21 @@
}
-
//RPC function to receive notification strings
//note notification strings should not contain the character ' ', in lieu
//they should contain '_' to indicate spaces
void display_notification_rpc_func (Arguments *in, Reply *out) {
+ static char title_str[18];
static char display_str[18];
static const char * msg_str;
+ static const char * title_str_ptr;
int i,j;
bool break_out = false;
display_notification = true;
display_time = false;
+ title_str_ptr = in->getArg<const char *>(); //get a pointer to the location where the title argument string is stored
msg_str = in->getArg<const char*>(); //get a pointer to the location where the argument string is stored
stdio_mutex.lock();
@@ -230,6 +232,15 @@
uLCD.cls();
uLCD.locate(0,0);
+ for(j=0; j<18; j++){
+ if (title_str_ptr[j] == '_'){title_str[j] = ' ';}
+ else {title_str[j] = title_str_ptr[j];}
+ if (title_str_ptr[j] == '\0') {break;}
+ }
+ uLCD.printf("%s\r\n",title_str);
+ uLCD.filled_rectangle(0,10,128,15,RED+BLUE);
+
+ uLCD.locate(0,2);
i = 0;
while(true){
for(j=0; j<18; j++){