bosko lekovic
/
EthToCom_11
nova proba
Diff: DataFlash/dataFlash.cpp
- Revision:
- 13:03617f6ed112
- Parent:
- 8:c0f54b381346
- Child:
- 18:5ee53205451a
--- a/DataFlash/dataFlash.cpp Fri May 01 23:15:28 2020 +0000 +++ b/DataFlash/dataFlash.cpp Sat May 02 23:54:44 2020 +0200 @@ -108,14 +108,16 @@ //#define COPY_IP_TO_FLASH( dest, source ) if( test_ip( pch->source ) ) strncpy( gps_rd->dest, pch->source, 16 ) -#define COPY_IP_HTML_TO_FLASH( param ) if( test_ip( pch->get_##param() ) ) strncpy( gps_rd->param, pch->get_##param(), 16 ) +#define COPY_IP_HTML_TO_FLASH( param ) if( test_ip( pch->get_##param() ) ) strncpy( gps_rd->param, pch->get_##param(), 16 ); \ + else strncpy( gps_rd->param, " ", 16 ); #define COPY_IP_HTML_TO_FLASH_idx( param, idx ) \ if( test_ip( pch->get_##param(idx+1) ) ) strncpy( gps_rd->param[idx], pch->get_##param(idx+1), 16 ); \ else strncpy( gps_rd->param[idx], " ", 16 ); //#define COPY_PORT_TO_FLASH( dest, source ) if( test_num( pch->source)) strncpy( gps_rd->dest, pch->source, 6 ); -#define COPY_PORT_HTML_TO_FLASH( param ) if( test_num( pch->get_##param())) strncpy( gps_rd->param, pch->get_##param( ), 6 ); +#define COPY_PORT_HTML_TO_FLASH( param ) if( test_num( pch->get_##param())) strncpy( gps_rd->param, pch->get_##param( ), 6 ); \ + else strncpy( gps_rd->param, " ", 6 ); #define COPY_PORT_HTML_TO_FLASH_idx( param, idx ) \ if( test_num( pch->get_##param(idx+1))) strncpy( gps_rd->param[idx], pch->get_##param( idx+1 ), 6 ); \ else strncpy( gps_rd->param[idx], " ", 6 );