Skip to content

Commit

Permalink
only transmit packets on key press 't'
Browse files Browse the repository at this point in the history
  • Loading branch information
tixiv committed Dec 18, 2012
1 parent d2d32e8 commit 7b58577
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/uart_frontend/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ void transmit_packets(){
static uint16_t count;

ticker++;
if ((ticker == 5000 ))
//if ((ticker == 5000 ))
if(do_transmit)
{
do_transmit = 0;
ticker = 0;
rfm12_tx (sizeof(tv), 0, tv);

Expand Down
4 changes: 4 additions & 0 deletions examples/uart_frontend/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "../../src/xprintf/xprintf.h"


uint8_t do_transmit;

static void show_parameter(uint8_t cmd){
char s[16];
Expand Down Expand Up @@ -115,6 +116,9 @@ void handle_settings_menu(){
case KEY_EXIT:
return;
break;
case 't':
do_transmit = 1;
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions examples/uart_frontend/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ void load_settings();
void save_settings();
void handle_settings_menu();

extern uint8_t do_transmit;

0 comments on commit 7b58577

Please sign in to comment.