Skip to content

Commit

Permalink
Bugfix update for TCP server firmware and GUI software
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin K Whitchurch committed Feb 26, 2018
1 parent c9c98dd commit ac5a29e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/firmware-upgrades.md
Expand Up @@ -10,7 +10,7 @@ The firmware for the HeartyPatch's on-board Espressif ESP32 chip uses the [esp-i
**Please make sure all of the above tools are properly installed before proceeding.**

**The current version of the HeartyPatch code compiles well and performs well only with v2.1 of the ESP-IDF and version 1.22.0-61-gab8375a-5.2.0 of the Xtensa toolchain.**

Setup guides for these components are available on the [ESP-IDF documentation site](https://esp-idf.readthedocs.io/en/v2.1/get-started/index.html).

You can then clone our [Github repository](https://github.com/Protocentral/protocentral_heartypatch) of code for the ESP32:
Expand Down
2 changes: 1 addition & 1 deletion firmware/heartypatch-stream-tcp/main/kalam32_tcp_server.c
Expand Up @@ -59,7 +59,7 @@ static void send_data(void *pvParameters)
db=databuff;
vTaskDelay(100/portTICK_RATE_MS);
ESP_LOGI(TAG, "start sending...");

while(1)
{
db = max30003_read_send_data();
Expand Down
14 changes: 7 additions & 7 deletions firmware/heartypatch-stream-tcp/main/max30003.c
Expand Up @@ -195,9 +195,9 @@ void max30003_initchip(int pin_miso, int pin_mosi, int pin_sck, int pin_cs )

MAX30003_Reg_Write(MNGR_INT, 0x000004);
vTaskDelay(100 / portTICK_PERIOD_MS);

MAX30003_Reg_Write(EN_INT,0x000400);
vTaskDelay(100 / portTICK_PERIOD_MS);
vTaskDelay(100 / portTICK_PERIOD_MS);

max30003_synch();

Expand All @@ -212,13 +212,13 @@ uint8_t* max30003_read_send_data(void)
{
max30003_reg_read(ECG_FIFO);

unsigned long data0 = (unsigned long) (SPI_temp_32b[1]);
unsigned long data0 = (unsigned long) (SPI_temp_32b[0]);
data0 = data0 <<24;
unsigned long data1 = (unsigned long) (SPI_temp_32b[2]);
unsigned long data1 = (unsigned long) (SPI_temp_32b[1]);
data1 = data1 <<16;
unsigned long data2 = (unsigned long) (SPI_temp_32b[3]);
data2 = data2 >>6;
data2 = data2 & 0x03;
unsigned long data2 = (unsigned long) (SPI_temp_32b[2]);
data2 = data2 & 0xc0;
data2 = data2 << 8;

data = (unsigned long) (data0 | data1 | data2);
ecgdata = (signed long) (data);
Expand Down
2 changes: 1 addition & 1 deletion firmware/heartypatch-stream-tcp/sdkconfig
Expand Up @@ -86,7 +86,7 @@ CONFIG_APP_OFFSET=0x10000
#
# HeartyPatch Configuration
#
CONFIG_WIFI_SSID="protocentral"
CONFIG_WIFI_SSID="circuitectsACT"
CONFIG_WIFI_PASSWORD="open1234"
CONFIG_TCP_ENABLE=y
CONFIG_MDNS_ENABLE=y
Expand Down
2 changes: 1 addition & 1 deletion firmware/heartypatch-stream-tcp/sdkconfig.old
Expand Up @@ -30,7 +30,7 @@ CONFIG_BOOTLOADER_VDDSDIO_BOOST=y
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_PORT="/dev/tty.usbserial-DN02T3D4"
CONFIG_ESPTOOLPY_PORT="/dev/tty.usbserial-DN02SKF9"
# CONFIG_ESPTOOLPY_BAUD_115200B is not set
CONFIG_ESPTOOLPY_BAUD_230400B=y
# CONFIG_ESPTOOLPY_BAUD_921600B is not set
Expand Down
Expand Up @@ -506,7 +506,7 @@ void pc_processData(char rxch)
ces_pkt_hr_bytes[3] = CES_Pkt_Data_Counter[11];

int data1 = pc_AssembleBytes(ces_pkt_ecg_bytes, ces_pkt_ecg_bytes.length-1);
ecg = (double) data1/(Math.pow(10, 3));
ecg = (double) data1/64;
println(ecg);

int data2 = pc_AssembleBytes(ces_pkt_rtor_bytes, ces_pkt_rtor_bytes.length-1);
Expand Down

0 comments on commit ac5a29e

Please sign in to comment.