Gustavo Belduma
/
nRF51822_SimpleControls_1
Macros Corregidas
Diff: main.cpp
- Revision:
- 6:84154a9a8717
- Parent:
- 5:a8c07a29df8a
- Child:
- 7:fb4c6c1dd3a9
--- a/main.cpp Tue Jun 14 19:08:23 2016 +0000 +++ b/main.cpp Fri Jul 01 15:30:22 2016 +0000 @@ -98,10 +98,7 @@ static const uint8_t uart_base_uuid_rev[] = {0x1E, 0x94, 0x8D, 0xF1, 0x48, 0x31, 0x94, 0xBA, 0x75, 0x4C, 0x3E, 0x50, 0, 0, 0x3D, 0x71}; // Declarando los vectores de configuracion para el mote. -static const uint8_t di_conf [] = {0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, A_2, A_1, A_0}; // length: 10 -static const uint8_t do_conf [] = {0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, A_5, A_4, A_3}; // length: 10 -static const uint8_t ai_conf [] = {D_9, D_8, D_7, D_6, D_5, D_4, D_3, D_2, D_1, D_0}; // length: 10 -static const uint8_t ao_conf [] = {0x00, D_18, D_17, D_16, D_15, D_14, D_13, D_12, D_11, D_10}; // length: 10 +static const uint8_t di_conf [] = {0xA1, 0x04, 0xA0, 0x0A, 0xD1, 0x04, 0xD0, 0x01}; // length: 10 uint8_t txPayload[TXRX_BUF_LEN] = {0,}; @@ -230,10 +227,7 @@ uint8_t buf[3]; if(send_config > 0) { - ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), di_conf, 10); - ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), do_conf, 10); - ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), ai_conf, 10); - ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), ao_conf, 10); + ble.updateCharacteristicValue(rxCharacteristic.getValueAttribute().getHandle(), di_conf, 8); send_config -= 1; pc.printf("value: %d\r\n", send_config); }