Commits

andyhelp committed c13567e

examples/SimpleOutput - runs with fake transceiver

Example log:
--- cut ---
tal_init_transceiver
tal_set_channel - 26
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_set_channel - 27
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
tal_look_for_packet - 10
--- cut ---

Comments (0)

Files changed (1)

examples/SimpleOutput/SimpleOutput.pde

 
     \return void
 */
-void main_orig(void)
+void main_setup(void)
 {
     const UInt8 * PARAM_PTR = NULL;
     UInt16 param_len = 0;
 //        initialize_leds();
     #endif    
     
-//    INIT_TICK();
+    INIT_TICK();
 //    ENABLE_GLOBAL_INTERRUPTS();
-//    FLASH_ERASE_CHECK();
+    FLASH_ERASE_CHECK();
 
     #ifdef _PEER
     if(((PARAM_PTR = read_param(ONE_NET_CLIENT_FLASH_NV_DATA, &param_len))
     {
         one_net_client_look_for_invite(&DEV_KEY);
     } // else join a network //
+}
 
-    while(1)
-    {
-        // Dec. 3, 2011 -- commenting out
-        #if 0
-        if(tx_led_timer && tx_led_timer < one_net_tick())
-        {
-            TURN_OFF(TX_LED);
-            tx_led_timer = 0;
-        } // if time to turn off the tx led //
-        
-        if(rx_led_timer && rx_led_timer < one_net_tick())
-        {
-            TURN_OFF(RX_LED);
-            rx_led_timer = 0;
-        } // if time to turn off the rx led //
-        #endif
-
-        one_net_client();
-    } // main loop //
+void main_loop(void)
+{
+	// Dec. 3, 2011 -- commenting out
+	#if 0
+	if(tx_led_timer && tx_led_timer < one_net_tick())
+	{
+		TURN_OFF(TX_LED);
+		tx_led_timer = 0;
+	} // if time to turn off the tx led //
+
+	if(rx_led_timer && rx_led_timer < one_net_tick())
+	{
+		TURN_OFF(RX_LED);
+		rx_led_timer = 0;
+	} // if time to turn off the rx led //
+	#endif
+
+	one_net_client();
 } // main //
 
 //! @} simple_relay_pri_func
 
 void setup()
 {
-	main_orig();
+	Serial.begin(9600);
+	main_setup();
 }
 
 void loop()
 {
+	main_loop();
 }