changeset 636:2737ddc643bb

3.11 release
author heinrichsweikamp
date Mon, 25 May 2020 17:35:30 +0200
parents 9a64914a8fca
children a3b21497d17e
files src/adc_lightsensor.asm src/comm.asm src/configuration.inc src/isr.asm src/menu_tree.asm src/surfmode.asm src/text_french.inc src/tft.asm src/tft_outputs.asm
diffstat 9 files changed, 51 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/src/adc_lightsensor.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/adc_lightsensor.asm	Mon May 25 17:35:30 2020 +0200
@@ -66,6 +66,10 @@
 	bcf		LEDr							; switch off red LED
 	bcf		TRISJ,2							; activate Chrg-Out output
 	bsf		CHRG_OUT						; start charger
+	nop ; Ignore some noise
+	nop
+	nop
+	nop
 	btfss	CHRG_IN							; charging?
 	bra		charge_cc_active				; YES - charging in CC mode
 	bcf		CHRG_OUT						; NO  - stop charger
--- a/src/comm.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/comm.asm	Mon May 25 17:35:30 2020 +0200
@@ -1,6 +1,6 @@
 ;=============================================================================
 ;
-;   File comm.asm                           * combined next generation V3.09.5
+;   File comm.asm                           * combined next generation V3.10.0
 ;
 ;   RS232 via USB
 ;
@@ -364,7 +364,7 @@
 	command_decode 0x78,comm_option_reset_all		; x  reset all option values to their factory default
 	command_decode 0xFF,comm_service_exit			;    exit comm mode
  IFDEF _screendump
-	command_decode 0x6C,TFT_dump_screen				; l  dump the screen contents
+	command_decode 0x6C,TFT_dump_screen_comm		; l  dump the screen contents
  ENDIF
 
 	btfss	comm_service_mode						; service mode enabled?
@@ -388,6 +388,16 @@
 
 
 ;-----------------------------------------------------------------------------
+; Screendump
+;
+ IFDEF _screendump
+TFT_dump_screen_comm:
+	call	TFT_dump_screen							; dump the screen contents and set screen_dump_avail
+	;bra	comm_service_exit						; exit comm mode
+ ENDIF
+
+
+;-----------------------------------------------------------------------------
 ; Exit Comm Mode
 ;
 comm_service_exit:
@@ -1156,17 +1166,17 @@
 	; check validity of type
 	movlw	0x14						; last option index for gases
 	cpfsgt	lo							; received option index > end of gas range ?
-	bra		comm_write_check_dil		; YES - check type for diluents
-	;bra	comm_write_check_gas		; NO  - check type for gases
+	bra		comm_write_check_gas		; NO  - check type for gases
+	;bra	comm_write_check_dil		; YES - check type for diluents
+
+comm_write_check_dil:
+	; check validity of type for a diluent
+	movlw	num_dil_types				; load number of diluent types
+	bra		comm_write_check_com		; continue with common part
 
 comm_write_check_gas:
 	; check validity of type for a gas
 	movlw	num_gas_types				; load number of gas types
-	bra		comm_write_check_com		; continue with common part
-
-comm_write_check_dil:
-	; check validity of type for a diluent
-	movlw	num_dil_types				; load number of diluent types
 	;bra	comm_write_check_com		; continue with common part
 
 comm_write_check_com:
--- a/src/configuration.inc	Thu May 07 09:12:59 2020 +0200
+++ b/src/configuration.inc	Mon May 25 17:35:30 2020 +0200
@@ -24,7 +24,7 @@
 #endif
 
 #define fw_version_major		0x03
-#define fw_version_minor		0x0A
+#define fw_version_minor		0x0B
 #define fw_version_beta			0x00
 
 
@@ -44,7 +44,7 @@
 
 #define firmware_creation_year	0x14
 #define firmware_creation_month	0x05
-#define firmware_creation_day	0x07
+#define firmware_creation_day	0x19
 
 #define firmware_expire_year	0x15
 #define firmware_expire_month	0x02
--- a/src/isr.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/isr.asm	Mon May 25 17:35:30 2020 +0200
@@ -288,6 +288,12 @@
 	movlw	.248						; reload timer 7, high byte (8x256 ticks -> 62.5 ms)
 	movwf	TMR7H						; ...                       (keep low byte running )
 
+	btfss	update_surface_pressure				; shall update the surface pressure?
+	bra	isr_tmr7_0					; NO  - skip
+	bcf	update_surface_pressure				; YES - clear request flag
+	MOVII	pressure_abs_ref,pressure_surf		;     - update surface pressure
+
+isr_tmr7_0:	
 	call	get_analog_switches			; get analog readings - bank-safe, but CAUTION: returns in bank common
 	banksel	isr_backup					; back to ISR default bank
 
@@ -344,23 +350,14 @@
  ENDIF
 
 isr_tmr7_2:
-	btfsc	block_sensor_interrupt				; sensor interrupts disabled?
-	bra		sensor_int_state_exit				; YES - goto exit
 
-isr_sensor_state2:
+;isr_sensor_state2:
 	btfss	sensor_state_counter,0				; every 1/4 second
 	bsf		trigger_quarter_second				; set flag
 
 	btfss	speed_is_normal						; CPU running on normal speed?
 	rcall	isr_set_speed_to_normal				; NO - set CPU speed to normal
 
-	; update surface pressure
-	btfss	update_surface_pressure				; shall update the surface pressure?
-	bra		isr_sensor_state2_1					; NO
-	bcf		update_surface_pressure				; YES - clear request flag
-	MOVII	pressure_abs_ref,pressure_surf		;     - update surface pressure
-
-isr_sensor_state2_1:
 	incf	sensor_state_counter,F				; counts to eight for state machine
 
 ; State 1: clear flags and average registers, get temperature (51 us) and start pressure integration (73.5 us)
--- a/src/menu_tree.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/menu_tree.asm	Mon May 25 17:35:30 2020 +0200
@@ -2089,12 +2089,12 @@
 	bra		$+4
 	bra		do_use_16650_battery
 
-	movlw	0x93						; OSTC 2 (2017 model)
+	movlw	0x93						; OSTC Plus and OSTC 2 (2017 model)
 	cpfseq	HW_descriptor
 	bra		$+4
-	bra		do_use_16650_battery
+	bra		do_menu_new_battery_AA_charger
 
-	movlw	0x13						; OSTC Plus						TODO: and OSTC 2 new model as of now
+	movlw	0x13						; OSTC Plus and OSTC 2 (2017 model), w/o blockwrite
 	cpfseq	HW_descriptor
 	bra		$+4
 	bra		do_menu_new_battery_AA_charger
--- a/src/surfmode.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/surfmode.asm	Mon May 25 17:35:30 2020 +0200
@@ -205,6 +205,7 @@
 	call	TFT_Display_FadeIn			; show resulting surface screen
 
  IFDEF _screendump
+ extern	enable_rs232
 	btfsc	screen_dump_avail			; screen dump function enabled?
 	call	enable_rs232				; YES - activate RS232 (also sets CPU to normal speed)
  ENDIF
--- a/src/text_french.inc	Thu May 07 09:12:59 2020 +0200
+++ b/src/text_french.inc	Mon May 25 17:35:30 2020 +0200
@@ -469,7 +469,7 @@
  ENDIF
 
  IFDEF _ccr_pscr
-	TCODE	tGasDensity,		"G.Density"				; Gas Density   (max. 9 chars)	## pending translation
+	TCODE	tGasDensity,		"G.Densité"				; Gas Density   (max. 9 chars)
  ENDIF
 
  IFDEF _rx_functions
--- a/src/tft.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/tft.asm	Mon May 25 17:35:30 2020 +0200
@@ -1482,7 +1482,6 @@
 ;
 	global	TFT_dump_screen_check
 TFT_dump_screen_check:
-	return
 	btfss	vusb_in					; USB (still) plugged in?
 	bcf		screen_dump_avail		; NO - disable screen dump function
 
--- a/src/tft_outputs.asm	Thu May 07 09:12:59 2020 +0200
+++ b/src/tft_outputs.asm	Mon May 25 17:35:30 2020 +0200
@@ -71,12 +71,12 @@
 
 
 pallet_table:
-	;	mask			disabled			memo			advice			attention		warning			; pallet
-	;	---------------	-------------------	---------------	---------------	---------------	---------------	  --------
-	DB	color_green,	color_lightblue,	color_white,	color_green,	color_yellow,	color_red		; standard
-	DB	color_red,		color_dark_red,		color_orange,	color_green,	color_yellow,	color_red		; redish
-	DB	color_cyan,		color_dark_green,	color_green,	color_green,	color_yellow,	color_red		; greenish
-	DB	color_blue,		color_deepblue,		color_lightblue,color_green,	color_yellow,	color_red		; blueish
+    ;    mask         disabled          memo advice          attention     warning   ; pallet
+    ;    ------------ ----------------- ---------------- --------------- ------------- --------- ----------
+    DB   color_green, color_lightblue,  color_white, color_green,    color_yellow, color_red ; standard
+    DB   color_red,   color_dark_red,   color_orange, color_greenish, color_pink,   color_red ; reddish
+    DB   color_cyan,  color_dark_green, color_green, color_green,    color_cyan,   color_red ; greenish
+    DB   color_blue,  color_deepblue,   color_lightblue, color_greenish, color_orange, color_red ; blueish
 
 
 ;=============================================================================
@@ -6043,34 +6043,17 @@
 	btfsc	alt_layout_active					; alternative layout active?
 	return										; YES - abort
 
-;	WIN_TINY .100,.30							; surface mode: fits under the textual logo in the upper right corner
+	WIN_TINY .100,.30							; surface mode: fits under the textual logo in the upper right corner
 ;	WIN_TINY  .35, .0							; dive    mode: fits to the right side of the depth label
-	WIN_TINY   .0, .		0					; dive    mode: overwrites depth label
+;	WIN_TINY   .0, .		0					; dive    mode: overwrites depth label
 	FONT_COLOR_MEMO								; set color
 
-	; deco engine scheduling performance
-	MOVII	int_O_profiling_overrun,mpr			; runtime +/- versus target
-	btfss	mpr+1,7								; overrun?
-	bra		TFT_debug_output_1					; YES
-	bcf		mpr+1,7								; NO - clear flag
-	PUTC	"-"									;    - print a minus
-	bra		TFT_debug_output_2					;    - continue
-TFT_debug_output_1:
-	PUTC	" "									; print a space instead of the minus
-TFT_debug_output_2:
-	output_999									; print time (0-999)
-	PUTC	"."									; print a dot as separator
-	MOVII	int_O_profiling_overrun_max,mpr		; get max runtime so far
-	output_999									; print (0-999)
-	PUTC	"."									; print a dot as separator
-	movff	char_O_profiling_overrun_phase,WREG	; get calculation phase causing the max runtime
-	output_hex									; print a hex
-	PUTC	"."									; print a dot as separator
-	movff	char_O_profiling_runs_norm,mpr		; get runs/cycle normal plan
-	output_99									; print (0-99)
-	PUTC	"."									; print a dot as separator
-	movff	char_O_profiling_runs_alt,mpr		; get runs/cycle alternative plan
-	output_99									; print (0-99)
+	movff	analog_sw1,mpr
+	output_256
+	PUTC	','
+	movff	analog_sw2,mpr
+	output_256
+	
 	PRINT										; dump to screen
 	return										; done