connect = LED CYAN; working = LED BLUE

This commit is contained in:
weiting2
2020-03-17 10:52:21 +08:00
parent 7ae75451bc
commit a3a69d24fd
5 changed files with 11 additions and 5 deletions
@@ -86,5 +86,6 @@ struct HEADSTAGE_STATE {
static bool STI = false;
static uint8_t spi_state_counter = 0;
static bool FirstTimeConnect = false;
#endif
@@ -1162,7 +1162,7 @@ static void headstage_neu_state_spi() {
else{
SPICallBack = READ_MOSI;
NEULIVE_STATE.state = NEU_READ_DATA;
headstage_led_color(COLOR_CYAN);
headstage_led_color(COLOR_BLUE);
spi_state_counter = 0;
AppendSPITX(0, 0);
headstage_spi_transaction(SPI_BUFFER_SIZE);
@@ -6,11 +6,11 @@
#define VERSION_DATE_MONTH 3
#define VERSION_DATE_DAY 17
#define VERSION_DATE_HOUR 10
#define VERSION_DATE_MINUTE 31
#define VERSION_DATE_MINUTE 51
// this is NOT the version hash !!
// it's the last version hash
#define VERSION_HASH 6937b6a54f5425004bc47edc414b05705d6dc5ee
#define VERSION_HASH 7ae75451bc9431817d0cadb2b634be2c07e34189
#define VERSION_GIT_BRANCH Neulive2.0_developement
#endif
@@ -11,13 +11,14 @@ static void MCUReset(){
// Reset INSTRUCTION & NEULIVE_STATE
ResetINSTRUCTION();
spi_state_counter = 0;
// SPI buffer reset
for(int i=0 ; i<SPI_BUFFER_SIZE ; i++ ){
spi_txbuf[i] = 0;
spi_rxbuf[i] = 0;
}
SPICallBack = ONE_SHOT_SPI;
// spi_state_counter = 0;
for(int i=0 ; i<SPI_LED_BUFF_SIZE ; i++){
headstage_spi_led_txbuf[i] = 0;
@@ -35,7 +36,10 @@ static void MCUReset(){
not_buf_offset = NOT_BUF_OFFSET_INIT;
not_time_stamp = 0;
headstage_led_color(COLOR_GREEN); // color green
if(!FirstTimeConnect){
headstage_led_color(COLOR_GREEN); // color green
}
FirstTimeConnect = false;
}
static void DBSReset(){
@@ -832,6 +832,7 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
GAPRole_GetParameter(GAPROLE_CONNHANDLE, &cxnHandle);
if (SUCCESS == HCI_LE_SetDataLenCmd(cxnHandle, requestedPDUSize, requestTxTime)) {
FirstTimeConnect = true;
headstage_led_color(COLOR_CYAN);
}
// Use numActive to determine the connection handle of the last