Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 340:ecbbbd423e86
BUGFIX save negativ temperatures in logbook (bbbug #6)
BUGFIX temperature & amb_pressure averaging done in private variable.
BUGFIX Signed averaging of temperature.
author | JeanDo |
---|---|
date | Fri, 20 May 2011 00:39:05 +0200 |
parents | cb77d1fa4535 |
children | 2144f19fa1eb |
comparison
equal
deleted
inserted
replaced
339:cb77d1fa4535 | 340:ecbbbd423e86 |
---|---|
951 movff temperature+0,last_temperature+0 | 951 movff temperature+0,last_temperature+0 |
952 movff temperature+1,last_temperature+1 | 952 movff temperature+1,last_temperature+1 |
953 WIN_TOP .100 | 953 WIN_TOP .100 |
954 WIN_LEFT .1 | 954 WIN_LEFT .1 |
955 WIN_FONT FT_SMALL | 955 WIN_FONT FT_SMALL |
956 WIN_INVERT .0 ; Init new Wordprocessor | 956 WIN_INVERT .0 ; Init new Wordprocessor |
957 call PLED_standard_color | 957 call PLED_standard_color |
958 | 958 |
959 lfsr FSR2,letter | 959 movff temperature+1,hi |
960 movlw '-' | |
961 btfsc neg_temp ; Show "-"? | |
962 movwf POSTINC2 ; Yes | |
963 movff temperature+0,lo | 960 movff temperature+0,lo |
964 movff temperature+1,hi | 961 lfsr FSR2,letter |
962 | |
963 btfss hi,7 ; Negative temperature ? | |
964 bra PLED_temp_surfmode_1 ; No: continue | |
965 | |
966 PUTC '-' ; Display "-" | |
967 | |
968 comf hi ; Then, 16bit sign changes. | |
969 negf lo | |
970 btfsc STATUS,C | |
971 incf hi | |
972 | |
973 PLED_temp_surfmode_1: | |
965 movlw d'3' | 974 movlw d'3' |
966 movwf ignore_digits | 975 movwf ignore_digits |
967 bsf leftbind ; left orientated output | 976 bsf leftbind ; left orientated output |
968 output_16dp d'2' | 977 output_16dp d'2' |
969 bcf leftbind | 978 bcf leftbind |
981 WIN_LEFT .50 | 990 WIN_LEFT .50 |
982 WIN_FONT FT_SMALL | 991 WIN_FONT FT_SMALL |
983 WIN_INVERT .0 ; Init new Wordprocessor | 992 WIN_INVERT .0 ; Init new Wordprocessor |
984 call PLED_standard_color | 993 call PLED_standard_color |
985 | 994 |
986 lfsr FSR2,letter | 995 movff temperature+1,hi |
987 movlw '-' | |
988 btfsc neg_temp ; Show "-"? | |
989 movwf POSTINC2 ; Yes | |
990 movff temperature+0,lo | 996 movff temperature+0,lo |
991 movff temperature+1,hi | 997 lfsr FSR2,letter |
998 | |
999 btfss hi,7 ; Negative temperature ? | |
1000 bra PLED_temp_divemode_1 ; No: continue | |
1001 | |
1002 PUTC '-' ; Display "-" | |
1003 | |
1004 comf hi ; Then, 16bit sign changes. | |
1005 negf lo | |
1006 btfsc STATUS,C | |
1007 incf hi | |
1008 | |
1009 PLED_temp_divemode_1: | |
992 movlw d'3' | 1010 movlw d'3' |
993 movwf ignore_digits | 1011 movwf ignore_digits |
994 bsf leftbind ; left orientated output | 1012 bsf leftbind ; left orientated output |
995 output_16dp d'2' | 1013 output_16dp d'2' |
996 bcf leftbind | 1014 bcf leftbind |