/[H9]/trunk/Embedded/main.c
ViewVC logotype

Diff of /trunk/Embedded/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 201 by hedin, Sun Dec 9 15:07:32 2007 UTC revision 205 by hedin, Sun Dec 9 21:01:04 2007 UTC
# Line 45  __EEPROM_DATA( '1', '7', '8', '4',0,0,0, Line 45  __EEPROM_DATA( '1', '7', '8', '4',0,0,0,
45  void serial_recieved(void);  void serial_recieved(void);
46  void serial_send(void);  void serial_send(void);
47  void update_lcd(void);  void update_lcd(void);
48  void convertTemp(void);  void convert_temp(void);
49  void timer1_interrupt(void);  void timer1_interrupt(void);
50  void on_recieve(void);  void on_recieve(void);
51  void on_initial_recieve(void);  void on_initial_recieve(void);
# Line 218  void serial_send(void) Line 218  void serial_send(void)
218    
219  void on_initial_recieve(void)  void on_initial_recieve(void)
220  {  {
221          char imei[16];  // can't se what the outcommented lines in here sould do, that make any sence.
222          char* ptr;  //      char imei[16];
223          char i;  //      char* ptr;
224          char buf[2];  //      char i;
225    //      char buf[2];
226                    
227          if (strstr(global_serial_recieve_buffer,"+WIND: 11") != 0)          if (strstr(global_serial_recieve_buffer,"+WIND: 11") != 0)
228          {          {
229                  global_modem_init = 1;                  global_modem_init = 1;
230    
231                  ptr = strstr(global_serial_recieve_buffer,"cgsn");  //              ptr = strstr(global_serial_recieve_buffer,"cgsn");
232                  ptr +=4;  //              ptr +=4;
233                  strncpy(imei, ptr,15);  //              strncpy(imei, ptr,15);
234                  imei[15] = 0;  //              imei[15] = 0;
235                                    
236                  reset_recieve_buffer();                  reset_recieve_buffer();
237          }          }
# Line 304  void timer1_interrupt(void) Line 305  void timer1_interrupt(void)
305          TMR1L = 0xFF;          TMR1L = 0xFF;
306          global_time_counter++;          global_time_counter++;
307          global_emergency_counter++;          global_emergency_counter++;
308          RA1 = !RA1;  //      RA1 = !RA1;
309  }  }
310  //////////  ORDENARY FUNKTIONS  //////////  //////////  ORDENARY FUNKTIONS  //////////
311  void update_lcd(void)  void update_lcd(void)
# Line 346  void send_sms(const unsigned char* paylo Line 347  void send_sms(const unsigned char* paylo
347          }          }
348  }        }      
349    
350  void convert_temp()  void convert_temp(void)
351  {  {
352          short adVal;          short adVal;
353          adVal = (global_Pot_Hi << 8) | global_Pot_Lo;          adVal = (global_Pot_Hi << 8) | global_Pot_Lo;

Legend:
Removed from v.201  
changed lines
  Added in v.205

  ViewVC Help
Powered by ViewVC 1.1.20