diff src/calibrate.asm @ 656:8af5aefbcdaf default tip

Update to 3.31 beta
author heinrichsweikamp
date Thu, 27 Nov 2025 18:32:58 +0100
parents 75e90cd0c2c3
children
line wrap: on
line diff
--- a/src/calibrate.asm	Mon Apr 29 13:05:18 2024 +0200
+++ b/src/calibrate.asm	Thu Nov 27 18:32:58 2025 +0100
@@ -19,30 +19,31 @@
 ;=============================================================================
 
 
- IFDEF _external_sensor
+ IFDEF _external_sensor_eccr
 
 ;-----------------------------------------------------------------------------
 ; Transmit current Setpoint from WREG (in cbar) to external Electronics
 ;
 	global	transmit_setpoint
 transmit_setpoint:
-	return									; !!!! FUNCTION IS CURRENTLY DISABLED !!!!
-
-;	btfsc	ext_input_optical				; optical input in use?
-;	return									; YES - setpoint - TX not supported
-;	TSTOSS	opt_s8_mode						; NO  - S8 mode selected?
-;	return									;       NO
-;	clrf	lo								;       YES - initialize checksum
-;	movff	char_I_const_ppO2,hi			;           - copy setpoint value to hi
-;	movlw	0xAA							;           - load start byte
-;	rcall	tx_to_HUD_chksum				;           - transmit to HUD
-;	movlw	0x60							;           - load command 'new SP'
-;	rcall	tx_to_HUD_chksum				;           - transmit to HUD
-;	movf	hi,W							;           - load SP in cbar
-;	rcall	tx_to_HUD_chksum				;           - transmit to HUD
-;	movf	lo,W							;           - load checksum
-;	rcall	tx_to_HUD						;           - transmit checksum
-;	return									;           - done
+	btfsc	ext_s8_full_digital			;  are we in external S8 full digital mode? 
+	bra	transmit_setpoint2				    ; Yes, alsway TX Setpoint	
+	btfsc	ext_input_optical				; optical input in use?
+	return									; YES - setpoint - TX not supported
+	TSTOSS	opt_s8_mode						; NO  - S8 mode selected?
+	return									;       NO
+transmit_setpoint2:
+	clrf	lo								;       YES - initialize checksum
+	movff	char_I_const_ppO2,hi			;           - copy setpoint value to hi
+	movlw	0xAA							;           - load start byte
+	rcall	tx_to_HUD_chksum				;           - transmit to HUD
+	movlw	0x70							;           - load command 'new SP'
+	rcall	tx_to_HUD_chksum				;           - transmit to HUD
+	movf	hi,W							;           - load SP in cbar
+	rcall	tx_to_HUD_chksum				;           - transmit to HUD
+	movf	lo,W							;           - load checksum
+	rcall	tx_to_HUD						;           - transmit checksum
+	return									;           - done
 
 
 ;-----------------------------------------------------------------------------
@@ -73,6 +74,8 @@
 	; check for HUD
 	btfsc	ext_input_optical				; optical interface in use?
 	bra		calibrate_mix1					; YES - skip
+	btfsc	ext_s8_full_digital			;  are we in external S8 full digital mode? 
+	bra		calibrate_mix1					; YES - skip
 	TSTOSS	opt_s8_mode						; NO  - S8 interface in use?
 	bra		calibrate_mix1					;       NO  - skip HUD part
 	;bra	calibrate_mix0					;       YES - calibrate S8 HUD
@@ -193,13 +196,13 @@
 
 	retlw	.0								; return signaling min/max ok
 
- ENDIF	; _external_sensor
+ ENDIF	; _external_sensor_eccr
 
 ;=============================================================================
 calibrate2	CODE
 ;=============================================================================
 
- IFDEF _external_sensor
+ IFDEF _external_sensor_eccr
 
 ;-----------------------------------------------------------------------------
 ; Compute Sensor mV from Raw Values received via S8 digital Interface
@@ -234,7 +237,7 @@
 
 	return									; done
 
- ENDIF	; _external_sensor
+ ENDIF	; _external_sensor_eccr
 
 ;-----------------------------------------------------------------------------