Mercurial > public > hwos_code
comparison src/options.asm @ 560:b7eb98dbd800
bump to 2.96beta (REFACTORED VERSION)
author | heinrichsweikamp |
---|---|
date | Wed, 31 Jan 2018 19:39:37 +0100 |
parents | dfac393b2199 |
children | 8b7ea27ea1fa |
comparison
equal
deleted
inserted
replaced
559:9cb967d844f0 | 560:b7eb98dbd800 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File options.asm | 3 ; File options.asm REFACTORED VERSION V2.91 |
4 ; | 4 ; |
5 ; Manage all options data. | 5 ; Manage all options data. |
6 ; | 6 ; |
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. |
8 ;============================================================================= | 8 ;============================================================================= |
374 ; Increment an option, based on type, and boundary. | 374 ; Increment an option, based on type, and boundary. |
375 ; INPUT: FSR0 = option handle | 375 ; INPUT: FSR0 = option handle |
376 ; OUTPUT: none | 376 ; OUTPUT: none |
377 ; TRASH: TBLPTR, TABLAT, WREG, FSR0, FSR1 | 377 ; TRASH: TBLPTR, TABLAT, WREG, FSR0, FSR1 |
378 option_inc: | 378 option_inc: |
379 ; Read type, default and register from table | 379 ; Read type, default and register from table |
380 rcall option_read | 380 rcall option_read |
381 | 381 |
382 ; Switch on type | 382 ; Switch on type |
383 movf opt_type,W | 383 movf opt_type,W |
384 bz option_inc_uint8 | 384 bz option_inc_uint8 |
385 dcfsnz WREG | 385 dcfsnz WREG |
386 bra option_inc_enum8 | 386 bra option_inc_enum8 |
387 dcfsnz WREG | 387 dcfsnz WREG |
388 bra option_inc_string | 388 bra option_inc_string |
389 | 389 |
390 | |
390 option_inc_uint8: ; Defaults type too... | 391 option_inc_uint8: ; Defaults type too... |
391 movf INDF1,W | 392 movf INDF1,W |
392 addwf opt_inc,W | 393 addwf opt_inc,W |
393 cpfslt opt_max | 394 cpfslt opt_max |
394 bra option_inc_1 | 395 bra option_inc_1 |
395 movf opt_min,W | 396 movf opt_min,W |
396 option_inc_1: | 397 option_inc_1: |
397 movwf INDF1 | 398 movwf INDF1 |
398 | 399 |
400 ; NEW FROM HERE... ## voting logic (allow sensors for pSCR) | |
401 ; Now some rather crude hack into this routine to unify CCR & pSCR mode setting: | |
402 movlw .25 ; eeprom address of option oCCRMode | |
403 cpfseq opt_eeprom ; skip next line if we deal with this option right now | |
404 bra option_inc_2 | |
405 btfsc FLAG_pscr_mode ; skip next line if we are not in PSCR mode | |
406 bcf opt_ccr_mode,1 ; in pSCR mode, opt_ccr_mode may only be 0 or 1 | |
407 | |
408 option_inc_2: | |
409 ; ...UNTILL HERE | |
399 ; Now some rather crude hack into this routine to make CCR Calibration more convenient: | 410 ; Now some rather crude hack into this routine to make CCR Calibration more convenient: |
400 movlw .149 ; eeprom address of option CalGasO2 | 411 movlw .149 ; eeprom address of option CalGasO2 |
401 cpfseq opt_eeprom ; skip next line if we deal with this option right now | 412 cpfseq opt_eeprom ; skip next line if we deal with this option right now |
402 return | 413 return |
403 | 414 |
404 btfsc FLAG_pscr_mode ; skip next line if we are not in PSCR mode | 415 btfsc FLAG_pscr_mode ; skip next line if we are not in PSCR mode |
405 return | 416 return |
406 movlw .26 | 417 movlw .26 |
407 cpfseq INDF1 ; skip next line if current option value is =26 | 418 cpfseq INDF1 ; skip next line if current option value is =26 |