Commit c11cc683 authored by wyattc's avatar wyattc
Browse files

Bluetooth reception to global variables

parent b09f21d6
......@@ -24,6 +24,7 @@ void __FINISHED_INTERRUPT_HANDLER__() {
uint8_t arrow_pos = 0;
uint8_t tab_state = 0;
int progress=0;
int temp=0;
uint8_t g_rx_buff[6];
//clock/baudrate/16-1
#define BAUD_VALUE_115200 53
......@@ -74,13 +75,9 @@ uint8_t tab_state = 0;
for(i=0;i<500000;++i);
MSS_UART_get_rx( this_uart, g_rx_buff, sizeof(g_rx_buff) );
erase_block( BARSTART_X, BARSTART_Y, BARSTART_X+100,BAREND_Y);
if(atoi(g_rx_buff[0])<100)
fill(BARSTART_X, BARSTART_X+atoi(g_rx_buff[0]));
else if(atoi(g_rx_buff[0])>=100){
fill(BARSTART_X, BARSTART_X+100);
display_completed();
}
write_temp(g_rx_buff[1]);
progress=g_rx_buff[0];
temp=g_rx_buff[1];
signed char odox=g_rx_buff[2];
signed char odoy=g_rx_buff[3];
signed char mousex=g_rx_buff[4];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment