Skip to content

Commit

Permalink
Merge pull request #4 from Protocentral/serialStream
Browse files Browse the repository at this point in the history
Added vitals to the data packet
  • Loading branch information
suvarna84 authored Nov 5, 2024
2 parents 780d18e + da05f08 commit 3d906c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions lib/plotSerial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class _PlotSerialPageState extends State<PlotSerialPage> {
}

void pcProcessData(int rxch) async {
//print("data receiving:"+rxch.toString());
// print("data receiving:"+rxch.toString());
switch (pc_rx_state) {
case CESState_Init:
if (rxch == CES_CMDIF_PKT_START_1) {
Expand Down Expand Up @@ -135,7 +135,7 @@ class _PlotSerialPageState extends State<PlotSerialPage> {
if (rxch == CES_CMDIF_PKT_STOP) {
if (widget.selectedPortBoard == "Healthypi") {
// print("packet length: " + CES_Pkt_Len.toString());
if(CES_Pkt_Len == 40){
if(CES_Pkt_Len == 45){
for(int i = 0; i < 8; i++ ){
ces_pkt_ch1_buffer[0] = CES_Pkt_Data_Counter[(i*2)];
ces_pkt_ch1_buffer[1] = CES_Pkt_Data_Counter[(i*2)+1];
Expand Down Expand Up @@ -188,20 +188,20 @@ class _PlotSerialPageState extends State<PlotSerialPage> {
}


/*setStateIfMounted(() {
globalSpO2 = (CES_Pkt_Data_Counter[59]).toInt();
setStateIfMounted(() {
globalSpO2 = (CES_Pkt_Data_Counter[42]).toInt();
if (globalSpO2 == 25) {
displaySpO2 = "--";
} else {
displaySpO2 = globalSpO2.toString() + " %";
}
globalHeartRate = (CES_Pkt_Data_Counter[60]).toInt();
globalRespRate = (CES_Pkt_Data_Counter[61]).toInt();
globalTemp = (((CES_Pkt_Data_Counter[57] | CES_Pkt_Data_Counter[58] << 8)
globalHeartRate = (CES_Pkt_Data_Counter[43]).toInt();
globalRespRate = (CES_Pkt_Data_Counter[44]).toInt();
globalTemp = (((CES_Pkt_Data_Counter[40] | CES_Pkt_Data_Counter[41] << 8)
.toInt()) /
100.00)
.toDouble();
});*/
});

}else{
ces_pkt_ch1_buffer[0] = CES_Pkt_Data_Counter[0];
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: OpenView2
description: BLE companion app for use with ProtoCentral breakout boards and modules

version: 2.0.35+105
version: 2.0.36+106

environment:
sdk: ^3.3.0
Expand Down

0 comments on commit 3d906c1

Please sign in to comment.