bosko lekovic
/
EthToCom_11
nova proba
DataFlash/dataFlash.cpp@28:49bafc8bb056, 2021-01-18 (annotated)
- Committer:
- Bosko Lekovic
- Date:
- Mon Jan 18 14:46:46 2021 +0100
- Revision:
- 28:49bafc8bb056
- Parent:
- 24:ec9446d86668
novije
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bosko001 | 3:1196befeace0 | 1 | #include "dataFlash.h" |
bosko001 | 3:1196befeace0 | 2 | |
bosko001 | 3:1196befeace0 | 3 | #include "flashDataBlock.h" |
bosko001 | 3:1196befeace0 | 4 | #include "EthernetSetup.h" |
bosko001 | 3:1196befeace0 | 5 | #include "clubbing.h" |
bosko001 | 3:1196befeace0 | 6 | #include "dataFlash.h" |
bosko001 | 3:1196befeace0 | 7 | |
bosko001 | 5:c9a908749d4c | 8 | #include "doHTML.h" |
bosko001 | 5:c9a908749d4c | 9 | |
bosko001 | 5:c9a908749d4c | 10 | |
bosko001 | 5:c9a908749d4c | 11 | |
bosko001 | 5:c9a908749d4c | 12 | |
bosko001 | 5:c9a908749d4c | 13 | struct S_FlashData s_ramData, *gps_rd = &s_ramData; //RAM podaci |
bosko001 | 5:c9a908749d4c | 14 | |
bosko001 | 5:c9a908749d4c | 15 | |
bosko001 | 5:c9a908749d4c | 16 | /*********** upis/citanje na ram */ |
bosko001 | 5:c9a908749d4c | 17 | void progDataIntoFlash( struct S_FlashData *ps_fd ) |
bosko001 | 5:c9a908749d4c | 18 | { |
bosko001 | 5:c9a908749d4c | 19 | write_niz_in_flash( 0, (char *)ps_fd, sizeof(S_FlashData) ); |
bosko001 | 5:c9a908749d4c | 20 | } |
bosko001 | 5:c9a908749d4c | 21 | |
bosko001 | 5:c9a908749d4c | 22 | void readDataFromFlash( struct S_FlashData *ps_fd ) |
bosko001 | 5:c9a908749d4c | 23 | { |
bosko001 | 5:c9a908749d4c | 24 | read_fdb( 0, (char*)ps_fd, sizeof(struct S_FlashData) ); |
bosko001 | 5:c9a908749d4c | 25 | } |
bosko001 | 5:c9a908749d4c | 26 | |
bosko001 | 5:c9a908749d4c | 27 | |
bosko001 | 5:c9a908749d4c | 28 | /* upis citanje u RAM na koji pokazuje globalni pointer gps_rd */ |
bosko001 | 5:c9a908749d4c | 29 | void fillDataIntoFlash( void ) |
bosko001 | 5:c9a908749d4c | 30 | { |
bosko001 | 5:c9a908749d4c | 31 | progDataIntoFlash( gps_rd ); |
bosko001 | 5:c9a908749d4c | 32 | // write_niz_in_flash( 0, (char *)gps_rd, sizeof(S_FlashData) ); |
bosko001 | 5:c9a908749d4c | 33 | } |
bosko001 | 5:c9a908749d4c | 34 | void refreshDataFromFlash( void ) |
bosko001 | 5:c9a908749d4c | 35 | { |
bosko001 | 5:c9a908749d4c | 36 | readDataFromFlash( gps_rd ); |
bosko001 | 5:c9a908749d4c | 37 | // read_fdb( 0, (char*)gps_rd, sizeof(struct S_FlashData) ); |
bosko001 | 5:c9a908749d4c | 38 | } |
bosko001 | 5:c9a908749d4c | 39 | |
bosko001 | 5:c9a908749d4c | 40 | |
bosko001 | 22:11279d24a105 | 41 | int doinit_FlashData( void ) |
bosko001 | 5:c9a908749d4c | 42 | { |
bosko001 | 22:11279d24a105 | 43 | if( init_fdb( ) ) return 1; |
bosko001 | 22:11279d24a105 | 44 | else readDataFromFlash( gps_rd ); |
bosko001 | 22:11279d24a105 | 45 | return 0; |
bosko001 | 5:c9a908749d4c | 46 | } |
bosko001 | 5:c9a908749d4c | 47 | |
bosko001 | 5:c9a908749d4c | 48 | |
bosko001 | 5:c9a908749d4c | 49 | void deinit_FlashData( void ) |
bosko001 | 5:c9a908749d4c | 50 | { |
bosko001 | 5:c9a908749d4c | 51 | deinit_fdb( ); |
bosko001 | 5:c9a908749d4c | 52 | } |
bosko001 | 5:c9a908749d4c | 53 | |
Bosko Lekovic |
18:5ee53205451a | 54 | char * get_myIPfromFlash( void ) { return gps_rd->myIP; } |
Bosko Lekovic |
18:5ee53205451a | 55 | char *get_myMASKfromFlash(void ) { return gps_rd->myMASK; } |
Bosko Lekovic |
18:5ee53205451a | 56 | char *get_myGATEfromFlash( void ) {return gps_rd->myGATE; } |
Bosko Lekovic |
18:5ee53205451a | 57 | |
Bosko Lekovic |
18:5ee53205451a | 58 | |
Bosko Lekovic |
18:5ee53205451a | 59 | |
bosko001 | 5:c9a908749d4c | 60 | void showFlashData( void ) |
bosko001 | 5:c9a908749d4c | 61 | { |
bosko001 | 7:7ea932eb31f6 | 62 | refreshDataFromFlash( ); |
bosko001 | 7:7ea932eb31f6 | 63 | P_str( "FLASH IP ", gps_rd->myIP ); |
bosko001 | 8:c0f54b381346 | 64 | P_str( "FLASH MASK ", gps_rd->myMASK ); |
bosko001 | 8:c0f54b381346 | 65 | P_str( "FLASH GATE ", gps_rd->myGATE ); |
bosko001 | 5:c9a908749d4c | 66 | |
bosko001 | 7:7ea932eb31f6 | 67 | P_str( "FLASH UDP PORT ", gps_rd->myUdpPort ); |
bosko001 | 7:7ea932eb31f6 | 68 | P_str( "FLASH TCP PORT ", gps_rd->myTcpPort ); |
bosko001 | 5:c9a908749d4c | 69 | |
bosko001 | 7:7ea932eb31f6 | 70 | P_str( "FLASH UDP IP[0] ", gps_rd->UdpIP[0] ); |
bosko001 | 7:7ea932eb31f6 | 71 | P_str( "FLASH UDP IP[1] ", gps_rd->UdpIP[1] ); |
bosko001 | 7:7ea932eb31f6 | 72 | P_str( "FLASH UDP IP[2] ", gps_rd->UdpIP[2] ); |
bosko001 | 7:7ea932eb31f6 | 73 | P_str( "FLASH UDP IP[3] ", gps_rd->UdpIP[3] ); |
bosko001 | 7:7ea932eb31f6 | 74 | P_str( "FLASH UDP IP[4] ", gps_rd->UdpIP[4] ); |
bosko001 | 7:7ea932eb31f6 | 75 | |
bosko001 | 7:7ea932eb31f6 | 76 | P_str( "FLASH UDP PORT[0] ", gps_rd->UdpPort[0] ); |
bosko001 | 7:7ea932eb31f6 | 77 | P_str( "FLASH UDP PORT[1] ", gps_rd->UdpPort[1] ); |
bosko001 | 7:7ea932eb31f6 | 78 | P_str( "FLASH UDP PORT[2] ", gps_rd->UdpPort[2] ); |
bosko001 | 7:7ea932eb31f6 | 79 | P_str( "FLASH UDP PORT[3] ", gps_rd->UdpPort[3] ); |
bosko001 | 7:7ea932eb31f6 | 80 | |
bosko001 | 7:7ea932eb31f6 | 81 | P_str( "FLASH TCP IP[0] ", gps_rd->TcpIP[0] ); |
bosko001 | 7:7ea932eb31f6 | 82 | P_str( "FLASH TCP IP[1] ", gps_rd->TcpIP[1] ); |
bosko001 | 7:7ea932eb31f6 | 83 | P_str( "FLASH TCP IP[2] ", gps_rd->TcpIP[2] ); |
bosko001 | 7:7ea932eb31f6 | 84 | P_str( "FLASH TCP IP[3] ", gps_rd->TcpIP[3] ); |
bosko001 | 7:7ea932eb31f6 | 85 | P_str( "FLASH TCP IP[4] ", gps_rd->TcpIP[4] ); |
bosko001 | 7:7ea932eb31f6 | 86 | |
bosko001 | 7:7ea932eb31f6 | 87 | P_str( "FLASH TCP PORT[0] ", gps_rd->TcpPort[0] ); |
bosko001 | 7:7ea932eb31f6 | 88 | P_str( "FLASH TCP PORT[1] ", gps_rd->TcpPort[1] ); |
bosko001 | 7:7ea932eb31f6 | 89 | P_str( "FLASH TCP PORT[2] ", gps_rd->TcpPort[2] ); |
bosko001 | 7:7ea932eb31f6 | 90 | P_str( "FLASH TCP PORT[3] ", gps_rd->TcpPort[3] ); |
bosko001 | 5:c9a908749d4c | 91 | |
bosko001 | 7:7ea932eb31f6 | 92 | P_str( "FLASH SERIAL BAUD ", gps_rd->baud_rate ); |
bosko001 | 7:7ea932eb31f6 | 93 | P_str( "FLASH SERIAL BAUD ", gps_rd->parity ); |
bosko001 | 7:7ea932eb31f6 | 94 | P_str( "FLASH SERIAL BAUD ", gps_rd->data_bits ); |
bosko001 | 7:7ea932eb31f6 | 95 | P_str( "FLASH SERIAL BAUD ", gps_rd->stop_bits ); |
bosko001 | 5:c9a908749d4c | 96 | } |
bosko001 | 5:c9a908749d4c | 97 | |
bosko001 | 5:c9a908749d4c | 98 | |
bosko001 | 7:7ea932eb31f6 | 99 | // |
bosko001 | 7:7ea932eb31f6 | 100 | //struct S_FlashData |
bosko001 | 7:7ea932eb31f6 | 101 | //{ |
bosko001 | 7:7ea932eb31f6 | 102 | // char myIP[16]; |
bosko001 | 7:7ea932eb31f6 | 103 | // char myMask[16]; |
bosko001 | 7:7ea932eb31f6 | 104 | // char myGate[16]; |
bosko001 | 7:7ea932eb31f6 | 105 | // char myUdpPort[6]; |
bosko001 | 7:7ea932eb31f6 | 106 | // char myTcpPort[6]; |
bosko001 | 7:7ea932eb31f6 | 107 | // char UdpIP[5][16]; |
bosko001 | 7:7ea932eb31f6 | 108 | // char UdpPort[4][6]; |
bosko001 | 7:7ea932eb31f6 | 109 | // char TcpPort[4][6]; |
bosko001 | 7:7ea932eb31f6 | 110 | // char baud_rate[7], parity[6], data_bits[2], stop_bits[4]; |
bosko001 | 7:7ea932eb31f6 | 111 | //}; |
bosko001 | 7:7ea932eb31f6 | 112 | |
bosko001 | 7:7ea932eb31f6 | 113 | |
bosko001 | 7:7ea932eb31f6 | 114 | |
bosko001 | 8:c0f54b381346 | 115 | //#define COPY_IP_TO_FLASH( dest, source ) if( test_ip( pch->source ) ) strncpy( gps_rd->dest, pch->source, 16 ) |
bosko001 | 8:c0f54b381346 | 116 | |
bosko001 | 13:03617f6ed112 | 117 | #define COPY_IP_HTML_TO_FLASH( param ) if( test_ip( pch->get_##param() ) ) strncpy( gps_rd->param, pch->get_##param(), 16 ); \ |
bosko001 | 13:03617f6ed112 | 118 | else strncpy( gps_rd->param, " ", 16 ); |
bosko001 | 8:c0f54b381346 | 119 | #define COPY_IP_HTML_TO_FLASH_idx( param, idx ) \ |
bosko001 | 8:c0f54b381346 | 120 | if( test_ip( pch->get_##param(idx+1) ) ) strncpy( gps_rd->param[idx], pch->get_##param(idx+1), 16 ); \ |
bosko001 | 8:c0f54b381346 | 121 | else strncpy( gps_rd->param[idx], " ", 16 ); |
bosko001 | 8:c0f54b381346 | 122 | |
bosko001 | 8:c0f54b381346 | 123 | |
bosko001 | 8:c0f54b381346 | 124 | //#define COPY_PORT_TO_FLASH( dest, source ) if( test_num( pch->source)) strncpy( gps_rd->dest, pch->source, 6 ); |
bosko001 | 13:03617f6ed112 | 125 | #define COPY_PORT_HTML_TO_FLASH( param ) if( test_num( pch->get_##param())) strncpy( gps_rd->param, pch->get_##param( ), 6 ); \ |
bosko001 | 13:03617f6ed112 | 126 | else strncpy( gps_rd->param, " ", 6 ); |
bosko001 | 8:c0f54b381346 | 127 | #define COPY_PORT_HTML_TO_FLASH_idx( param, idx ) \ |
bosko001 | 8:c0f54b381346 | 128 | if( test_num( pch->get_##param(idx+1))) strncpy( gps_rd->param[idx], pch->get_##param( idx+1 ), 6 ); \ |
bosko001 | 8:c0f54b381346 | 129 | else strncpy( gps_rd->param[idx], " ", 6 ); |
bosko001 | 7:7ea932eb31f6 | 130 | |
bosko001 | 5:c9a908749d4c | 131 | |
bosko001 | 5:c9a908749d4c | 132 | void putHTMLintoFLASH( C_HTMLparse *pch ) |
bosko001 | 5:c9a908749d4c | 133 | { |
bosko001 | 5:c9a908749d4c | 134 | |
bosko001 | 8:c0f54b381346 | 135 | // COPY_IP_TO_FLASH( myIP, get_myIP() ); |
bosko001 | 8:c0f54b381346 | 136 | COPY_IP_HTML_TO_FLASH( myIP ); |
bosko001 | 8:c0f54b381346 | 137 | COPY_IP_HTML_TO_FLASH( myMASK ); |
bosko001 | 8:c0f54b381346 | 138 | COPY_IP_HTML_TO_FLASH( myGATE ); |
bosko001 | 8:c0f54b381346 | 139 | |
bosko001 | 8:c0f54b381346 | 140 | // COPY_IP_TO_FLASH( myMASK, get_myMASK() ); |
bosko001 | 8:c0f54b381346 | 141 | // COPY_IP_TO_FLASH( myGATE, get_myGATE() ); |
bosko001 | 5:c9a908749d4c | 142 | |
bosko001 | 8:c0f54b381346 | 143 | COPY_PORT_HTML_TO_FLASH( myUdpPort ); |
bosko001 | 8:c0f54b381346 | 144 | COPY_PORT_HTML_TO_FLASH( myTcpPort ); |
bosko001 | 8:c0f54b381346 | 145 | // COPY_PORT_TO_FLASH( myUdpPort, get_myUdpPort() ); |
bosko001 | 8:c0f54b381346 | 146 | // COPY_PORT_TO_FLASH( myTcpPort, get_myTcpPort() ); |
bosko001 | 8:c0f54b381346 | 147 | |
bosko001 | 8:c0f54b381346 | 148 | COPY_IP_HTML_TO_FLASH_idx( UdpIP, 0 ); |
bosko001 | 8:c0f54b381346 | 149 | COPY_IP_HTML_TO_FLASH_idx( UdpIP, 1 ); |
bosko001 | 8:c0f54b381346 | 150 | COPY_IP_HTML_TO_FLASH_idx( UdpIP, 2 ); |
bosko001 | 8:c0f54b381346 | 151 | COPY_IP_HTML_TO_FLASH_idx( UdpIP, 3 ); |
bosko001 | 8:c0f54b381346 | 152 | COPY_IP_HTML_TO_FLASH_idx( UdpIP, 4 ); |
bosko001 | 8:c0f54b381346 | 153 | // COPY_IP_TO_FLASH( UdpIP[0], get_UdpIP(1) ); |
bosko001 | 8:c0f54b381346 | 154 | // COPY_IP_TO_FLASH( UdpIP[1], get_UdpIP(2) ); |
bosko001 | 8:c0f54b381346 | 155 | // COPY_IP_TO_FLASH( UdpIP[2], get_UdpIP(3) ); |
bosko001 | 8:c0f54b381346 | 156 | // COPY_IP_TO_FLASH( UdpIP[3], get_UdpIP(4) ); |
bosko001 | 8:c0f54b381346 | 157 | // COPY_IP_TO_FLASH( UdpIP[4], get_UdpIP(5) ); |
bosko001 | 7:7ea932eb31f6 | 158 | |
bosko001 | 8:c0f54b381346 | 159 | COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 0 ); |
bosko001 | 8:c0f54b381346 | 160 | COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 1 ); |
bosko001 | 8:c0f54b381346 | 161 | COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 2 ); |
bosko001 | 8:c0f54b381346 | 162 | COPY_PORT_HTML_TO_FLASH_idx( UdpPort, 3 ); |
bosko001 | 8:c0f54b381346 | 163 | // COPY_PORT_TO_FLASH( UdpPort[0], get_UdpPort(1) ); |
bosko001 | 8:c0f54b381346 | 164 | // COPY_PORT_TO_FLASH( UdpPort[1], get_UdpPort(2) ); |
bosko001 | 8:c0f54b381346 | 165 | // COPY_PORT_TO_FLASH( UdpPort[2], get_UdpPort(3) ); |
bosko001 | 8:c0f54b381346 | 166 | // COPY_PORT_TO_FLASH( UdpPort[3], get_UdpPort(4) ); |
bosko001 | 5:c9a908749d4c | 167 | |
bosko001 | 8:c0f54b381346 | 168 | COPY_IP_HTML_TO_FLASH_idx( TcpIP, 0 ); |
bosko001 | 8:c0f54b381346 | 169 | COPY_IP_HTML_TO_FLASH_idx( TcpIP, 1 ); |
bosko001 | 8:c0f54b381346 | 170 | COPY_IP_HTML_TO_FLASH_idx( TcpIP, 2 ); |
bosko001 | 8:c0f54b381346 | 171 | COPY_IP_HTML_TO_FLASH_idx( TcpIP, 3 ); |
bosko001 | 8:c0f54b381346 | 172 | COPY_IP_HTML_TO_FLASH_idx( TcpIP, 4 ); |
bosko001 | 8:c0f54b381346 | 173 | // COPY_IP_TO_FLASH( TcpIP[0], get_TcpIP(1) ); |
bosko001 | 8:c0f54b381346 | 174 | // COPY_IP_TO_FLASH( TcpIP[1], get_TcpIP(2) ); |
bosko001 | 8:c0f54b381346 | 175 | // COPY_IP_TO_FLASH( TcpIP[2], get_TcpIP(3) ); |
bosko001 | 8:c0f54b381346 | 176 | // COPY_IP_TO_FLASH( TcpIP[3], get_TcpIP(4) ); |
bosko001 | 8:c0f54b381346 | 177 | // COPY_IP_TO_FLASH( TcpIP[4], get_TcpIP(5) ); |
bosko001 | 8:c0f54b381346 | 178 | |
bosko001 | 8:c0f54b381346 | 179 | COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 0 ); |
bosko001 | 8:c0f54b381346 | 180 | COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 1 ); |
bosko001 | 8:c0f54b381346 | 181 | COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 2 ); |
bosko001 | 8:c0f54b381346 | 182 | COPY_PORT_HTML_TO_FLASH_idx( TcpPort, 3 ); |
bosko001 | 8:c0f54b381346 | 183 | // COPY_PORT_TO_FLASH( TcpPort[0], get_TcpPort(1) ); |
bosko001 | 8:c0f54b381346 | 184 | // COPY_PORT_TO_FLASH( TcpPort[1], get_TcpPort(2) ); |
bosko001 | 8:c0f54b381346 | 185 | // COPY_PORT_TO_FLASH( TcpPort[2], get_TcpPort(3) ); |
bosko001 | 8:c0f54b381346 | 186 | // COPY_PORT_TO_FLASH( TcpPort[3], get_TcpPort(4) ); |
bosko001 | 5:c9a908749d4c | 187 | |
bosko001 | 7:7ea932eb31f6 | 188 | strncpy( gps_rd->baud_rate, pch->get_selected_option( "baud_rate" ), 7 ); |
bosko001 | 7:7ea932eb31f6 | 189 | strncpy( gps_rd->parity, pch->get_selected_option( "parity" ), 6 ); |
bosko001 | 7:7ea932eb31f6 | 190 | strncpy( gps_rd->data_bits, pch->get_selected_option( "data_bits" ), 2 ); |
bosko001 | 7:7ea932eb31f6 | 191 | strncpy( gps_rd->stop_bits, pch->get_selected_option( "stop_bits" ), 4 ); |
bosko001 | 7:7ea932eb31f6 | 192 | |
bosko001 | 5:c9a908749d4c | 193 | fillDataIntoFlash( ); |
bosko001 | 5:c9a908749d4c | 194 | } |
bosko001 | 5:c9a908749d4c | 195 | |
bosko001 | 8:c0f54b381346 | 196 | |
bosko001 | 8:c0f54b381346 | 197 | //#define COPY_IP_FLASH_TO_HTML( dest, source ) if( test_ip( gps_rd->source ) ) pch->dest( gps_rd->source ); |
bosko001 | 8:c0f54b381346 | 198 | #define COPY_IP_FLASH_TO_HTML( param ) if( test_ip( gps_rd->param ) ) pch->set_##param( gps_rd->param ); |
bosko001 | 24:ec9446d86668 | 199 | #define COPY_IP_FLASH_TO_HTML_idx( param, idx ) /* if( test_ip( gps_rd->param[idx] ) )*/ pch->set_##param( idx+1, gps_rd->param[idx] ); |
bosko001 | 8:c0f54b381346 | 200 | |
bosko001 | 8:c0f54b381346 | 201 | #define COPY_PORT_FLASH_TO_HTML( param ) if( test_num( gps_rd->param )) pch->set_##param(gps_rd->param); |
bosko001 | 24:ec9446d86668 | 202 | #define COPY_PORT_FLASH_TO_HTML_idx( param, idx ) /* if( test_num( gps_rd->param[idx] ))*/ pch->set_##param(idx+1, gps_rd->param[idx]); |
bosko001 | 5:c9a908749d4c | 203 | |
bosko001 | 5:c9a908749d4c | 204 | void putFLASHintoHTML( C_HTMLparse *pch ) |
bosko001 | 5:c9a908749d4c | 205 | { |
bosko001 | 5:c9a908749d4c | 206 | |
bosko001 | 5:c9a908749d4c | 207 | refreshDataFromFlash( ); |
bosko001 | 5:c9a908749d4c | 208 | |
bosko001 | 8:c0f54b381346 | 209 | COPY_IP_FLASH_TO_HTML( myIP ); |
bosko001 | 8:c0f54b381346 | 210 | COPY_IP_FLASH_TO_HTML( myIP ); |
bosko001 | 8:c0f54b381346 | 211 | COPY_IP_FLASH_TO_HTML( myMASK ); |
bosko001 | 8:c0f54b381346 | 212 | COPY_IP_FLASH_TO_HTML( myGATE ); |
bosko001 | 8:c0f54b381346 | 213 | // if( test_ip( gps_rd->myIP ) ) pch->set_myIP( gps_rd->myIP ); |
bosko001 | 8:c0f54b381346 | 214 | // if( test_ip( gps_rd->myMASK ) ) pch->set_myMASK( gps_rd->myMASK ); |
bosko001 | 8:c0f54b381346 | 215 | // if( test_ip( gps_rd->myGATE ) ) pch->set_myGATE( gps_rd->myGATE ); |
bosko001 | 5:c9a908749d4c | 216 | |
bosko001 | 8:c0f54b381346 | 217 | COPY_PORT_FLASH_TO_HTML( myUdpPort ); |
bosko001 | 8:c0f54b381346 | 218 | COPY_PORT_FLASH_TO_HTML( myTcpPort ); |
bosko001 | 8:c0f54b381346 | 219 | // if( test_num( gps_rd->myUdpPort )) pch->set_myUdpPort(gps_rd->myUdpPort); |
bosko001 | 8:c0f54b381346 | 220 | // if( test_num( gps_rd->myTcpPort )) pch->set_myTcpPort(gps_rd->myTcpPort); |
bosko001 | 5:c9a908749d4c | 221 | |
bosko001 | 8:c0f54b381346 | 222 | COPY_IP_FLASH_TO_HTML_idx( UdpIP, 0 ); |
bosko001 | 8:c0f54b381346 | 223 | COPY_IP_FLASH_TO_HTML_idx( UdpIP, 1 ); |
bosko001 | 8:c0f54b381346 | 224 | COPY_IP_FLASH_TO_HTML_idx( UdpIP, 2 ); |
bosko001 | 8:c0f54b381346 | 225 | COPY_IP_FLASH_TO_HTML_idx( UdpIP, 3 ); |
bosko001 | 8:c0f54b381346 | 226 | COPY_IP_FLASH_TO_HTML_idx( UdpIP, 4 ); |
bosko001 | 8:c0f54b381346 | 227 | // if( test_ip( gps_rd->UdpIP[0] ) ) pch->set_UdpIP(1,gps_rd->UdpIP[0]); |
bosko001 | 8:c0f54b381346 | 228 | // if( test_ip( gps_rd->UdpIP[1] ) ) pch->set_UdpIP(2,gps_rd->UdpIP[1]); |
bosko001 | 8:c0f54b381346 | 229 | // if( test_ip( gps_rd->UdpIP[2] ) ) pch->set_UdpIP(3,gps_rd->UdpIP[2]); |
bosko001 | 8:c0f54b381346 | 230 | // if( test_ip( gps_rd->UdpIP[3] ) ) pch->set_UdpIP(4,gps_rd->UdpIP[3]); |
bosko001 | 8:c0f54b381346 | 231 | // if( test_ip( gps_rd->UdpIP[4] ) ) pch->set_UdpIP(5,gps_rd->UdpIP[4]); |
bosko001 | 5:c9a908749d4c | 232 | |
bosko001 | 8:c0f54b381346 | 233 | COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 0 ); |
bosko001 | 8:c0f54b381346 | 234 | COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 1 ); |
bosko001 | 8:c0f54b381346 | 235 | COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 2 ); |
bosko001 | 8:c0f54b381346 | 236 | COPY_PORT_FLASH_TO_HTML_idx( UdpPort, 3 ); |
bosko001 | 8:c0f54b381346 | 237 | // if( test_num( gps_rd->UdpPort[0] )) pch->set_UdpPort( 1, gps_rd->UdpPort[0] ); |
bosko001 | 8:c0f54b381346 | 238 | // if( test_num( gps_rd->UdpPort[1] )) pch->set_UdpPort( 2, gps_rd->UdpPort[1] ); |
bosko001 | 8:c0f54b381346 | 239 | // if( test_num( gps_rd->UdpPort[2] )) pch->set_UdpPort( 3, gps_rd->UdpPort[2] ); |
bosko001 | 8:c0f54b381346 | 240 | // if( test_num( gps_rd->UdpPort[3] )) pch->set_UdpPort( 4, gps_rd->UdpPort[3] ); |
bosko001 | 7:7ea932eb31f6 | 241 | |
bosko001 | 8:c0f54b381346 | 242 | COPY_IP_FLASH_TO_HTML_idx( TcpIP, 0 ); |
bosko001 | 8:c0f54b381346 | 243 | COPY_IP_FLASH_TO_HTML_idx( TcpIP, 1 ); |
bosko001 | 8:c0f54b381346 | 244 | COPY_IP_FLASH_TO_HTML_idx( TcpIP, 2 ); |
bosko001 | 8:c0f54b381346 | 245 | COPY_IP_FLASH_TO_HTML_idx( TcpIP, 3 ); |
bosko001 | 8:c0f54b381346 | 246 | COPY_IP_FLASH_TO_HTML_idx( TcpIP, 4 ); |
bosko001 | 8:c0f54b381346 | 247 | // if( test_ip( gps_rd->TcpIP[0] ) ) pch->set_TcpIP(1, gps_rd->TcpIP[0]); |
bosko001 | 8:c0f54b381346 | 248 | // if( test_ip( gps_rd->TcpIP[1] ) ) pch->set_TcpIP(2, gps_rd->TcpIP[1]); |
bosko001 | 8:c0f54b381346 | 249 | // if( test_ip( gps_rd->TcpIP[2] ) ) pch->set_TcpIP(3, gps_rd->TcpIP[2]); |
bosko001 | 8:c0f54b381346 | 250 | // if( test_ip( gps_rd->TcpIP[3] ) ) pch->set_TcpIP(4, gps_rd->TcpIP[3]); |
bosko001 | 8:c0f54b381346 | 251 | // if( test_ip( gps_rd->TcpIP[4] ) ) pch->set_TcpIP(5, gps_rd->TcpIP[4]); |
bosko001 | 7:7ea932eb31f6 | 252 | |
bosko001 | 8:c0f54b381346 | 253 | COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 0 ); |
bosko001 | 8:c0f54b381346 | 254 | COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 1 ); |
bosko001 | 8:c0f54b381346 | 255 | COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 2 ); |
bosko001 | 8:c0f54b381346 | 256 | COPY_PORT_FLASH_TO_HTML_idx( TcpPort, 3 ); |
bosko001 | 8:c0f54b381346 | 257 | // if( test_num( gps_rd->TcpPort[0] )) pch->set_TcpPort( 1, gps_rd->TcpPort[0] ); |
bosko001 | 8:c0f54b381346 | 258 | // if( test_num( gps_rd->TcpPort[1] )) pch->set_TcpPort( 2, gps_rd->TcpPort[1] ); |
bosko001 | 8:c0f54b381346 | 259 | // if( test_num( gps_rd->TcpPort[2] )) pch->set_TcpPort( 3, gps_rd->TcpPort[2] ); |
bosko001 | 8:c0f54b381346 | 260 | // if( test_num( gps_rd->TcpPort[3] )) pch->set_TcpPort( 4, gps_rd->TcpPort[3] ); |
bosko001 | 7:7ea932eb31f6 | 261 | |
bosko001 | 7:7ea932eb31f6 | 262 | |
bosko001 | 7:7ea932eb31f6 | 263 | pch->set_selected_option( "baud_rate", gps_rd->baud_rate ); |
bosko001 | 7:7ea932eb31f6 | 264 | pch->set_selected_option( "parity", gps_rd->parity ); |
bosko001 | 7:7ea932eb31f6 | 265 | pch->set_selected_option( "data_bits", gps_rd->data_bits ); |
bosko001 | 7:7ea932eb31f6 | 266 | pch->set_selected_option( "stop_bits", gps_rd->stop_bits ); |
bosko001 | 5:c9a908749d4c | 267 | |
bosko001 | 5:c9a908749d4c | 268 | } |
bosko001 | 5:c9a908749d4c | 269 | |
bosko001 | 5:c9a908749d4c | 270 |