diff --git a/LHe-Level-Meter.cproj b/LHe-Level-Meter.cproj
index f5028d3..11253de 100644
--- a/LHe-Level-Meter.cproj
+++ b/LHe-Level-Meter.cproj
@@ -28,18 +28,18 @@
0
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
com.atmel.avrdbg.tool.powerdebugger
- J50200002200
+ J51800003073
0x1E9705
@@ -54,7 +54,7 @@
STK500
ISP
- 944399
+ 976237
@@ -69,7 +69,7 @@
- 944399
+ 976237
220000
true
false
@@ -85,7 +85,7 @@
ISP
com.atmel.avrdbg.tool.powerdebugger
- J50200002200
+ J51800003073
Power Debugger
0
diff --git a/avr-util-library b/avr-util-library
index fd90032..2a9be00 160000
--- a/avr-util-library
+++ b/avr-util-library
@@ -1 +1 @@
-Subproject commit fd900322de9a159eb6b8558e6ffa5de09f58a11c
+Subproject commit 2a9be000823f423f6d8717c4454917411077af12
diff --git a/config.h b/config.h
index 7eeb5ec..b73f3c1 100644
--- a/config.h
+++ b/config.h
@@ -12,7 +12,7 @@
-#define FIRMWARE_VERSION 223
+#define FIRMWARE_VERSION 224
#define BRANCH_ID 1
#define LAST_FIRMWARE_EEPROM_CHANGED 222
diff --git a/diag_pulse.c b/diag_pulse.c
index fc1785c..c169ec5 100644
--- a/diag_pulse.c
+++ b/diag_pulse.c
@@ -771,6 +771,10 @@ void diag_pulse_send(diag_pulseType *dp){
xbee_wake_up_plus();
+ InitScreen_AddLine("Sending Pulse Data:",1);
+
+
+ diag_send_r_calibration(dp);
if (connected.DS3231M)
@@ -804,7 +808,7 @@ void diag_pulse_send(diag_pulseType *dp){
diag_send_buffer[6] = n_Packets;
- InitScreen_AddLine("Sending Pulse Data:",1);
+
InitScreen_AddLine("Sending I data...",0);
@@ -892,6 +896,29 @@ void diag_send_sub_packets(diag_pulseType *dp,uint8_t Message_code,uint8_t n_Pac
}
}
+void diag_send_r_calibration(diag_pulseType *dp){
+ sprintf(LVM.temp->string,"Sending R span, zero");
+ InitScreen_AddLine(LVM.temp->string,0);
+
+ int32_t span32 = (int32_t)round(dp->r_span* 1000);
+ diag_send_buffer[0] = (span32 >> 24) & 0xFF;
+ diag_send_buffer[1] = (span32 >> 16) & 0xFF;
+ diag_send_buffer[2] = (span32 >> 8) & 0xFF;
+ diag_send_buffer[3] = span32 & 0xFF;
+
+
+ int16_t zero16 = (int16_t)round(dp->r_zero*10);
+ diag_send_buffer[4] = zero16 >> 8 & 0xFF;
+ diag_send_buffer[5] = zero16 & 0xFF ;
+
+ memcpy(LVM.temp->buffer,diag_send_buffer,6);
+ xbee_send_message(GET_R_CALIBRATION,LVM.temp->buffer,6);
+ _delay_ms(500);
+
+
+
+}
+
void diag_pulse(diag_pulseType *dp){
diff --git a/diag_pulse.h b/diag_pulse.h
index 8c607af..a981c83 100644
--- a/diag_pulse.h
+++ b/diag_pulse.h
@@ -38,5 +38,6 @@ void diag_pulse_move_cursor(diag_pulseType *dp,int8_t direction);
void diag_pulse_send(diag_pulseType *dp);
void diag_pulse(diag_pulseType *dp);
void diag_send_sub_packets(diag_pulseType *dp,uint8_t Message_code,uint8_t n_Packets);
+void diag_send_r_calibration(diag_pulseType *dp);
#endif /* DIAG_PULSE_H_ */
\ No newline at end of file