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.
Revision 6:72d46dbdbe7a, committed 2015-10-16
- Comitter:
- Overdrivr
- Date:
- Fri Oct 16 16:16:19 2015 +0000
- Parent:
- 5:e8936f38a338
- Commit message:
- removed 'static' keyword in front arrays that just increase RAM usage (premature optimization)
Changed in this revision
| distantio.cpp | Show annotated file Show diff for this revision Revisions of this file |
| protocol.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e8936f38a338 -r 72d46dbdbe7a distantio.cpp
--- a/distantio.cpp Wed Oct 14 09:42:32 2015 +0000
+++ b/distantio.cpp Fri Oct 16 16:16:19 2015 +0000
@@ -69,8 +69,6 @@
strncpy(Log.groups[Log.current_group_id].name,groupname,NAMESIZE);
}
-
-
void dIO_decode(uint8_t* data,uint16_t datasize)
{
// First check data size
@@ -164,7 +162,7 @@
void dIO_send_alive()
{
- static uint8_t buffer[FRAMESIZE];
+ uint8_t buffer[FRAMESIZE];
buffer[0] = 0x03;
// Compute crc
@@ -181,7 +179,7 @@
void dIO_emergency_send(void* ptr, uint16_t size, dio_type type, char* name, float recordingtime, uint16_t index)
{
- static uint8_t buffer[FRAMESIZE];
+ uint8_t buffer[FRAMESIZE];
// Response code 0x09
buffer[0] = 0x09;
@@ -244,7 +242,7 @@
if(index >= Log.amount)
return;
- static uint8_t buffer[FRAMESIZE];
+ uint8_t buffer[FRAMESIZE];
uint8_t type;
// Respond returned-descriptor
@@ -295,7 +293,7 @@
if(index > Log.current_group_id)
return;
- static uint8_t buffer[FRAMESIZE];
+ uint8_t buffer[FRAMESIZE];
// Respond returned-descriptor
buffer[0] = 0x00;
@@ -339,7 +337,7 @@
if(index >= Log.amount)
return;
- static uint8_t buffer[FRAMESIZE];
+ uint8_t buffer[FRAMESIZE];
// Response code 0x01
buffer[0] = 0x01;
diff -r e8936f38a338 -r 72d46dbdbe7a protocol.cpp
--- a/protocol.cpp Wed Oct 14 09:42:32 2015 +0000
+++ b/protocol.cpp Fri Oct 16 16:16:19 2015 +0000
@@ -81,7 +81,7 @@
void decode(uint8_t received_byte)
{
- static uint8_t decodingBuffer[DECODING_BUFFER_SIZE];
+ uint8_t decodingBuffer[DECODING_BUFFER_SIZE];
// If a reception was in process
if(protocol_state == IN_PROCESS)