![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
gotta check ctrl algo - it gives negative value
Fork of BAE_hw_test1_2 by
Diff: main.cpp
- Revision:
- 4:b33bc4267e0d
- Parent:
- 3:20647ff68b3c
- Child:
- 5:4199c0dfed33
--- a/main.cpp Sat Jan 31 14:11:53 2015 +0000 +++ b/main.cpp Tue Feb 03 16:43:05 2015 +0000 @@ -220,14 +220,14 @@ void FUNC_I2C_WRITE2CDMS(char *data, int length=1) { int slave_status = 1; -//t2.stop(); + //t2.stop(); if(interrupt ==1) { if(slave.receive() == 0) t2.stop(); -//t4.stop(); -// printf("\n\r %d ",slave.receive()); + //t4.stop(); + //printf("\n\r %d ",slave.receive()); if( slave.receive()==1) { t2.stop(); @@ -242,7 +242,6 @@ //t3.start(); slave_status=slave.read(data,length); //t3.stop(); - } @@ -265,7 +264,7 @@ // printf("\n\r entered thread"); if(i2c_status == 0 ) { - wait_ms(30); + wait_ms(20); FUNC_I2C_WRITE2CDMS(&data_receive,1); /*i2c_data * i2c_data_r = i2c_data_receive.alloc();