Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 553:2e70700774b9
Display dezimal for temperatures between 10 and 0?C
author | heinrichsweikamp |
---|---|
date | Sun, 19 Nov 2017 18:43:27 +0100 |
parents | af84c45429fd |
children | b7eb98dbd800 |
comparison
equal
deleted
inserted
replaced
552:af84c45429fd | 553:2e70700774b9 |
---|---|
1822 call convert_celsius_to_fahrenheit ; convert value in lo:hi from celsius to fahrenheit | 1822 call convert_celsius_to_fahrenheit ; convert value in lo:hi from celsius to fahrenheit |
1823 TFT_temp_common_1: | 1823 TFT_temp_common_1: |
1824 rcall TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | 1824 rcall TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required |
1825 btfsc neg_flag ; is the temperature negative? | 1825 btfsc neg_flag ; is the temperature negative? |
1826 bra TFT_temp_common_2 ; YES - the minus sign has already been written | 1826 bra TFT_temp_common_2 ; YES - the minus sign has already been written |
1827 ; temp is positive, is it less then 10°C? | |
1828 tstfsz hi | |
1829 bra TFT_temp_common_1a ; >25,5°C, skip here | |
1830 movlw .100 | |
1831 cpfslt lo | |
1832 bra TFT_temp_common_1a ; >10,0°C, skip here | |
1833 bsf leftbind | |
1834 output_16dp d'4' ; x.y°C | |
1835 bcf leftbind | |
1836 bra TFT_temp_common_3 ; Done. | |
1837 TFT_temp_common_1a: | |
1827 PUTC " " ; NO - write a space instead of the minus sign | 1838 PUTC " " ; NO - write a space instead of the minus sign |
1828 TFT_temp_common_2: | 1839 TFT_temp_common_2: |
1829 bsf ignore_digit5 ; ignore decimal | 1840 bsf ignore_digit5 ; ignore decimal |
1830 output_16_3 ; output 0-999 without decimal -> writes ' ' - 99 | 1841 output_16_3 ; output 0-999 without decimal -> writes ' ' - 99 |
1831 bcf ignore_digit5 | 1842 bcf ignore_digit5 |