Mercurial > public > hwos_code
comparison src/options.asm @ 0:11d4fc797f74
init
| author | heinrichsweikamp |
|---|---|
| date | Wed, 24 Apr 2013 19:22:45 +0200 |
| parents | |
| children | 4e3f133dfbf4 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:11d4fc797f74 |
|---|---|
| 1 ;============================================================================= | |
| 2 ; | |
| 3 ; File options.asm | |
| 4 ; | |
| 5 ; Manage all options data. | |
| 6 ; | |
| 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
| 8 ;============================================================================= | |
| 9 ; HISTORY | |
| 10 ; 2011-07-12 : [jDG] Creation. | |
| 11 ; | |
| 12 ; RATIONALS: | |
| 13 ; | |
| 14 ; Provides a centralized file with | |
| 15 | |
| 16 #include "ostc3.inc" ; Mandatory header | |
| 17 #include "strings.inc" | |
| 18 #include "convert.inc" | |
| 19 #include "ghostwriter.inc" | |
| 20 #include "eeprom_rs232.inc" | |
| 21 #include "external_flash.inc" | |
| 22 | |
| 23 extern write_eeprom | |
| 24 extern read_eeprom | |
| 25 extern eeprom_serial_save,eeprom_opt_backup | |
| 26 | |
| 27 global option_reset_all ; Reset all options to factory default. | |
| 28 global option_reset ; Reset FSR0 option to factory default. | |
| 29 global option_save_all ; Save options to EEPROM. | |
| 30 global option_restore_all ; Restore options from EEPROM. | |
| 31 global option_inc ; Increment FSR0 option. | |
| 32 global option_draw ; STRCAT FRS0 option. | |
| 33 | |
| 34 ;============================================================================= | |
| 35 CBLOCK tmp+0x10 ; Reserve space for wordprocessor & convert | |
| 36 opt_type | |
| 37 opt_default | |
| 38 opt_inc ; Also default+1 (string), and enum low | |
| 39 opt_min ; also enum high | |
| 40 opt_max | |
| 41 opt_unit:2 ; Multi-lingual unit text. | |
| 42 opt_eeprom | |
| 43 opt_backup_tbl:3 | |
| 44 ; Reserved to tmp+0x1F... | |
| 45 ENDC | |
| 46 | |
| 47 gui CODE ; Appends to other GUI segment | |
| 48 ;============================================================================= | |
| 49 ; Reset all options to factory defauts. | |
| 50 ; | |
| 51 ; INPUT: none | |
| 52 ; OUTPUT: none | |
| 53 ; TRASH: TBLPTR, TABLAT, WREG, FSR0, FSR1, FSR2 | |
| 54 | |
| 55 option_reset_all: | |
| 56 clrf EEADRH | |
| 57 read_int_eeprom .2 | |
| 58 movff EEDATA,lo | |
| 59 read_int_eeprom .3 | |
| 60 movff EEDATA,hi | |
| 61 tstfsz lo ; Total dives=0? | |
| 62 bra option_reset_all2 ; No, skip resetting logbook | |
| 63 tstfsz hi ; Total dives=0? | |
| 64 bra option_reset_all2 ; No, skip resetting logbook | |
| 65 | |
| 66 clrf EEADRH ; Make sure to select eeprom bank 0 | |
| 67 clrf EEDATA | |
| 68 write_int_eeprom .4 | |
| 69 write_int_eeprom .5 | |
| 70 write_int_eeprom .6 | |
| 71 write_int_eeprom .2 ; Also, delete total dive counter | |
| 72 write_int_eeprom .3 | |
| 73 call ext_flash_erase_logbook ; And complete logbook (!) | |
| 74 | |
| 75 option_reset_all2: | |
| 76 clrf lo | |
| 77 clrf hi | |
| 78 call do_logoffset_common_write ; reset Logbook offset | |
| 79 movlw LOW(option_table_begin) | |
| 80 movwf FSR0L | |
| 81 movlw HIGH(option_table_begin) | |
| 82 movwf FSR0H | |
| 83 | |
| 84 option_reset_all_1: | |
| 85 movf FSR0L,W ; Reached end of table ? | |
| 86 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) | |
| 87 btfsc STATUS,Z ; YES: done. | |
| 88 return | |
| 89 | |
| 90 rcall option_reset ; Reset one option. | |
| 91 bra option_reset_all_1 ; and loop. | |
| 92 | |
| 93 ;============================================================================= | |
| 94 ; Read option handle | |
| 95 ; INPUT: FSR0 = option handle | |
| 96 ; OUTPUT: FSR1 = address of variable. | |
| 97 ; TRASH: TBLPTR, TABLAT, WREG, FSR0, FSR1 | |
| 98 option_read: | |
| 99 movff FSR0L,TBLPTRL | |
| 100 movlw HIGH(option_table_begin); Get 8 high bits. | |
| 101 andlw 0xF0 ; Keep only the 4 highest ones. | |
| 102 iorwf FSR0H,W ; Cat with the known 4 lower ones. | |
| 103 movwf TBLPTRH ; And we have the high byte. | |
| 104 movlw UPPER(option_table_begin) | |
| 105 movwf TBLPTRU | |
| 106 | |
| 107 ; Read type, default and register from table | |
| 108 tblrd*+ | |
| 109 movff TABLAT,opt_type | |
| 110 tblrd*+ | |
| 111 movff TABLAT,opt_default | |
| 112 tblrd*+ | |
| 113 movff TABLAT,opt_inc | |
| 114 tblrd*+ | |
| 115 movff TABLAT,opt_min | |
| 116 tblrd*+ | |
| 117 movff TABLAT,opt_max | |
| 118 tblrd*+ | |
| 119 movff TABLAT,opt_eeprom | |
| 120 tblrd*+ | |
| 121 movff TABLAT,opt_unit+0 | |
| 122 tblrd*+ | |
| 123 movff TABLAT,opt_unit+1 | |
| 124 tblrd*+ | |
| 125 movff TABLAT,FSR1L | |
| 126 tblrd*+ | |
| 127 movff TABLAT,FSR1H | |
| 128 movff TBLPTRL,FSR0L ; Advance handle too, for reset_all | |
| 129 movff TBLPTRH,FSR0H | |
| 130 | |
| 131 return | |
| 132 | |
| 133 ;============================================================================= | |
| 134 ; Reset an option to its default value. | |
| 135 ; INPUT: FSR0 = option handle | |
| 136 ; OUTPUT: none | |
| 137 ; TRASH: TBLPTR, TABLAT, WREG, FSR1, FSR2 | |
| 138 ; | |
| 139 option_reset: | |
| 140 ; Read type, default and register from table | |
| 141 rcall option_read | |
| 142 | |
| 143 ; Switch on type | |
| 144 movf opt_type,W ; Type == STRING ? | |
| 145 xorlw 2 | |
| 146 bz opt_reset_string ; YES: special copy | |
| 147 | |
| 148 movff opt_default,INDF1 ; NO: just a 8bit indirect copy | |
| 149 return | |
| 150 | |
| 151 opt_reset_string: | |
| 152 movff FSR1L,FSR2L ; set string destination address. | |
| 153 movff FSR1H,FSR2H | |
| 154 | |
| 155 movff opt_default+0,FSR1L ; Get handle to multi-lingual text in FSR1 | |
| 156 movff opt_default+1,FSR1H | |
| 157 | |
| 158 movff TBLPTRL,opt_backup_tbl+0; TBLPTR trashed by text routine... | |
| 159 movff TBLPTRH,opt_backup_tbl+1 | |
| 160 movff TBLPTRU,opt_backup_tbl+2 | |
| 161 | |
| 162 call strcat_text ; Copy translated text to FSR2 | |
| 163 | |
| 164 movff opt_backup_tbl+0,TBLPTRL | |
| 165 movff opt_backup_tbl+1,TBLPTRH | |
| 166 movff opt_backup_tbl+2,TBLPTRU | |
| 167 | |
| 168 return | |
| 169 | |
| 170 ;============================================================================= | |
| 171 ; Save all options to EEPROM | |
| 172 option_save_all: | |
| 173 ;---- Save option serial into EEPROM to detect reset and new version | |
| 174 movlw LOW(eeprom_serial_save) | |
| 175 movwf EEADR | |
| 176 movlw HIGH(eeprom_serial_save) | |
| 177 movf EEADRH | |
| 178 movlw LOW(eeprom_opt_serial) | |
| 179 movwf EEDATA | |
| 180 call write_eeprom | |
| 181 incf EEADR,F | |
| 182 movlw HIGH(eeprom_opt_serial) | |
| 183 movwf EEDATA | |
| 184 call write_eeprom | |
| 185 | |
| 186 ;---- Save all options | |
| 187 movlw LOW(option_table_begin) | |
| 188 movwf FSR0L | |
| 189 movlw HIGH(option_table_begin) | |
| 190 movwf FSR0H | |
| 191 | |
| 192 option_save_all_1: | |
| 193 movf FSR0L,W ; Reached end of table ? | |
| 194 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) | |
| 195 btfsc STATUS,Z ; YES: done. | |
| 196 return | |
| 197 | |
| 198 rcall option_save ; Save one option. | |
| 199 bra option_save_all_1 ; and loop. | |
| 200 | |
| 201 option_save: | |
| 202 rcall option_read | |
| 203 incf opt_eeprom,W ; Should we save it ? | |
| 204 btfsc STATUS,Z ; eeprom address is FFh ? | |
| 205 return ; YES: nothing to do. | |
| 206 | |
| 207 movf opt_eeprom,W ; Compute backup address in EEPROM | |
| 208 addlw LOW(eeprom_opt_backup) ; Add offset | |
| 209 movwf EEADR | |
| 210 movlw HIGH(eeprom_opt_backup) | |
| 211 movwf EEADRH | |
| 212 | |
| 213 movf opt_type,W ; Option type is string ? | |
| 214 xorlw 2 | |
| 215 bz option_save_string | |
| 216 | |
| 217 ; One byte to save to eeprom | |
| 218 movff INDF1,EEDATA | |
| 219 goto write_eeprom | |
| 220 | |
| 221 option_save_string: | |
| 222 movff POSTINC1,EEDATA ; Write one byte | |
| 223 call write_eeprom | |
| 224 infsnz EEADR,F | |
| 225 incf EEADRH,F | |
| 226 | |
| 227 decfsz opt_max ; Decrement string length | |
| 228 bra option_save_string ; And loop while not finished | |
| 229 | |
| 230 return | |
| 231 ;============================================================================= | |
| 232 | |
| 233 option_restore_all: | |
| 234 ;---- Read option serial from EEPROM | |
| 235 movlw LOW(eeprom_serial_save) | |
| 236 movwf EEADR | |
| 237 movlw HIGH(eeprom_serial_save) | |
| 238 movf EEADRH | |
| 239 call read_eeprom | |
| 240 movlw LOW(eeprom_opt_serial) | |
| 241 xorwf EEDATA,W | |
| 242 bnz option_restore_bad ; Auto reset if changed. | |
| 243 incf EEADR,F | |
| 244 call read_eeprom | |
| 245 movlw HIGH(eeprom_opt_serial) | |
| 246 xorwf EEDATA,W | |
| 247 bz option_restore_ok ; Auto reset if changed. | |
| 248 | |
| 249 option_restore_bad: | |
| 250 call option_reset_all ; Reset RAM contains | |
| 251 goto option_save_all ; Then save to EEPROM | |
| 252 | |
| 253 ;---- Proper restore | |
| 254 option_restore_ok: | |
| 255 movlw LOW(option_table_begin) | |
| 256 movwf FSR0L | |
| 257 movlw HIGH(option_table_begin) | |
| 258 movwf FSR0H | |
| 259 | |
| 260 option_restore_all_1: | |
| 261 movf FSR0L,W ; Reached end of table ? | |
| 262 xorlw LOW(option_table_end) ; (8bit test -> 10 bytes x 128 options max) | |
| 263 btfsc STATUS,Z ; YES: done. | |
| 264 return | |
| 265 | |
| 266 rcall option_restore ; Restore one option. | |
| 267 bra option_restore_all_1 ; and loop. | |
| 268 return | |
| 269 | |
| 270 option_restore: | |
| 271 rcall option_read | |
| 272 incf opt_eeprom,W ; Should we save it ? | |
| 273 btfsc STATUS,Z ; eeprom address is FFh ? | |
| 274 return ; YES: nothing to do. | |
| 275 | |
| 276 movf opt_eeprom,W ; Compute backup address in EEPROM | |
| 277 addlw LOW(eeprom_opt_backup) ; Add offset | |
| 278 movwf EEADR | |
| 279 movlw HIGH(eeprom_opt_backup) | |
| 280 movwf EEADRH | |
| 281 | |
| 282 movf opt_type,W ; Option type is string ? | |
| 283 xorlw 2 | |
| 284 bz option_restore_string | |
| 285 | |
| 286 ; Read one byte from eeprom | |
| 287 call read_eeprom | |
| 288 movff EEDATA, INDF1 ; And restore option register. | |
| 289 return | |
| 290 | |
| 291 option_restore_string: | |
| 292 call read_eeprom ; Read one byte, and | |
| 293 movff EEDATA,POSTINC1 ; restore it | |
| 294 infsnz EEADR,F | |
| 295 incf EEADRH,F | |
| 296 | |
| 297 decfsz opt_max ; Decrement string length | |
| 298 bra option_restore_string ; And loop while not finished | |
| 299 return | |
| 300 | |
| 301 ;============================================================================= | |
| 302 ; Increment an option, based on type, and boundary. | |
| 303 ; INPUT: FSR0 = option handle | |
| 304 ; OUTPUT: none | |
| 305 ; TRASH: TBLPTR, TABLAT, WREG, FSR0, FSR1 | |
| 306 option_inc: | |
| 307 ; Read type, default and register from table | |
| 308 rcall option_read | |
| 309 | |
| 310 ; Switch on type | |
| 311 movf opt_type,W | |
| 312 bz option_inc_uint8 | |
| 313 dcfsnz WREG | |
| 314 bra option_inc_enum8 | |
| 315 dcfsnz WREG | |
| 316 bra option_inc_string | |
| 317 | |
| 318 option_inc_uint8: ; Defaults type too... | |
| 319 movf INDF1,W | |
| 320 addwf opt_inc,W | |
| 321 cpfslt opt_max | |
| 322 bra option_inc_1 | |
| 323 movf opt_min,W | |
| 324 option_inc_1: | |
| 325 movwf INDF1 | |
| 326 return | |
| 327 | |
| 328 option_inc_enum8: ; Always +1 | |
| 329 incf INDF1,W | |
| 330 cpfsgt opt_max | |
| 331 clrf WREG | |
| 332 movwf INDF1 | |
| 333 return | |
| 334 | |
| 335 option_inc_string: ; No edition yet... | |
| 336 return | |
| 337 | |
| 338 ;============================================================================= | |
| 339 ; Strcat option into FSR2 buffer. | |
| 340 option_draw: | |
| 341 ; Read type, default and register from table | |
| 342 rcall option_read | |
| 343 | |
| 344 ; Switch on type | |
| 345 movf opt_type,W | |
| 346 bz option_draw_uint8 | |
| 347 dcfsnz WREG | |
| 348 bra option_draw_enum8 | |
| 349 dcfsnz WREG | |
| 350 bra option_draw_string | |
| 351 return ; Unknown: return... | |
| 352 | |
| 353 option_draw_uint8: | |
| 354 movff INDF1,lo ; Draw value. | |
| 355 output_8 | |
| 356 clrf INDF2 ; Make sure to close string... | |
| 357 | |
| 358 btfsc settime_setdate ; In the Set Time or Set Date menu? | |
| 359 return ; Yes, ignore the rest | |
| 360 | |
| 361 movf opt_unit+0,W ; Is there a unit to append ? | |
| 362 iorwf opt_unit+1,W | |
| 363 rcall option_draw_unit | |
| 364 | |
| 365 movf opt_default,W ; Default value | |
| 366 cpfseq lo ; Current value | |
| 367 bra option_draw_uint8_2 ; Not default, add * | |
| 368 return ; Default, Done. | |
| 369 option_draw_uint8_2: | |
| 370 PUTC "*" | |
| 371 return ; Done. | |
| 372 | |
| 373 option_draw_unit: | |
| 374 movff opt_unit+0,FSR1L | |
| 375 movff opt_unit+1,FSR1H | |
| 376 goto strcat_text | |
| 377 | |
| 378 | |
| 379 | |
| 380 ;---- Draw an enumerated value (set of translated strings) | |
| 381 option_draw_enum8: | |
| 382 movf INDF1,W ; Get current value. | |
| 383 cpfsgt opt_max ; Bound value | |
| 384 clrf WREG | |
| 385 addwf WREG ; *= 2 | |
| 386 addwf opt_inc,W ; Base text + 2 * value | |
| 387 movwf FSR1L | |
| 388 movlw 0 | |
| 389 addwfc opt_min,W ; Propagate carry | |
| 390 movwf FSR1H ; Into FSR1 | |
| 391 | |
| 392 goto strcat_text | |
| 393 | |
| 394 option_draw_string: | |
| 395 movff POSTINC1,POSTINC2 | |
| 396 decfsz opt_max | |
| 397 bra option_draw_string | |
| 398 return | |
| 399 | |
| 400 ;============================================================================= | |
| 401 ; Options Tables | |
| 402 | |
| 403 OPTION_UINT8 MACRO lbl, min, max, default, unit, eeprom, register | |
| 404 global lbl | |
| 405 lbl: db 0, default ; Type0 = INT8 | |
| 406 db 1, min | |
| 407 db max, eeprom | |
| 408 dw unit | |
| 409 dw register | |
| 410 ENDM | |
| 411 | |
| 412 OPTION_UINT8p2 MACRO lbl, min, max, default, unit, eeprom, register | |
| 413 global lbl | |
| 414 lbl: db 0, default ; Type0 = INT8 | |
| 415 db 2, min | |
| 416 db max, eeprom | |
| 417 dw unit | |
| 418 dw register | |
| 419 ENDM | |
| 420 | |
| 421 OPTION_UINT8p3 MACRO lbl, min, max, default, unit, eeprom, register | |
| 422 global lbl | |
| 423 lbl: db 0, default ; Type0 = INT8 | |
| 424 db 3, min | |
| 425 db max, eeprom | |
| 426 dw unit | |
| 427 dw register | |
| 428 ENDM | |
| 429 | |
| 430 OPTION_UINT8p10 MACRO lbl, min, max, default, unit, eeprom, register | |
| 431 global lbl | |
| 432 lbl: db 0, default ; Type0 = INT8 | |
| 433 db .10, min | |
| 434 db max, eeprom | |
| 435 dw unit | |
| 436 dw register | |
| 437 ENDM | |
| 438 | |
| 439 OPTION_ENUM8 MACRO lbl, max, default, tValue, eeprom, register | |
| 440 global lbl | |
| 441 extern tValue | |
| 442 lbl: db 1, default ; Type1 = ENUM | |
| 443 db LOW(tValue), HIGH(tValue) | |
| 444 db max, eeprom | |
| 445 dw 0 ; No unit | |
| 446 dw register | |
| 447 ENDM | |
| 448 | |
| 449 OPTION_BOOL MACRO lbl, default, eeprom, register | |
| 450 OPTION_ENUM8 lbl, 2, default, tNo, eeprom, register | |
| 451 ENDM | |
| 452 | |
| 453 | |
| 454 OPTION_STRING MACRO lbl, length, defText, eeprom, register | |
| 455 global lbl | |
| 456 lbl: db 2, LOW(defText) ; Type2 = STRING | |
| 457 db HIGH(defText), 0 | |
| 458 db length, eeprom | |
| 459 dw 0 ; No unit | |
| 460 dw register | |
| 461 ENDM | |
| 462 | |
| 463 ;============================================================================= | |
| 464 ; Option table | |
| 465 ; OPTION_UINT8 Label, min, max, default, text-string, EEPROM location (-1 for RAM only), RAM location | |
| 466 | |
| 467 ; Manage Gas List. | |
| 468 extern tPercent, tMeters, tMinutes, tGasDisabled, tbar | |
| 469 | |
| 470 option_table_begin: | |
| 471 extern char_I_deco_gas_change, char_I_setpoint_change, char_I_setpoint_cbar, char_I_dil_change | |
| 472 ;============================================================================= | |
| 473 ; Manage Decoplaner & Dive parameters | |
| 474 | |
| 475 extern char_I_dive_interval, char_I_bottom_time, char_I_bottom_depth | |
| 476 OPTION_UINT8p10 odiveInterval, .0, .240, .0, tMinutes, -1, char_I_dive_interval | |
| 477 OPTION_UINT8p2 obottomTime, .1, .60, .5, tMinutes, -1, char_I_bottom_time | |
| 478 OPTION_UINT8p3 obottomDepth, .12,.120, .21, tMeters, -1, char_I_bottom_depth | |
| 479 | |
| 480 extern char_I_deco_model, char_I_saturation_multiplier, char_I_desaturation_multiplier | |
| 481 OPTION_ENUM8 oDiveMode, 4, 0, tDvOC, .8, opt_dive_mode | |
| 482 OPTION_ENUM8 oDecoMode, 2, 1, tZHL16, .9, char_I_deco_model | |
| 483 OPTION_UINT8p10 oPPO2Max, .120, ppo2_warning_high, .160, 0, .10, opt_ppO2_max | |
| 484 OPTION_UINT8 oLastDeco, .3, .6, .3, tMeters, .11, opt_last_stop | |
| 485 OPTION_UINT8 oGF_low, .10, .100, .40, tPercent, .12, opt_GF_low | |
| 486 OPTION_UINT8 oGF_high, .70, .110, .85, tPercent, .13, opt_GF_high | |
| 487 OPTION_UINT8p10 osatmult, .100, .140, .110,tPercent, .14, char_I_saturation_multiplier | |
| 488 OPTION_UINT8p10 odesatmult, .60, .100, .90,tPercent, .15, char_I_desaturation_multiplier | |
| 489 OPTION_UINT8p10 oPPO2Min, .16, ppo2_warning_low, .19, 0, .16, opt_ppO2_min | |
| 490 OPTION_UINT8 oaGF_low, .60, .100, .60, tPercent, .17, opt_aGF_low | |
| 491 OPTION_UINT8 oaGF_high, .80, .120, .85, tPercent, .18, opt_aGF_high | |
| 492 OPTION_BOOL oEnable_aGF, 1, .19, opt_enable_aGF ; =1: aGF can be selected underwater | |
| 493 | |
| 494 ;============================================================================= | |
| 495 ; Managing Settings | |
| 496 extern char_I_extra_time | |
| 497 OPTION_UINT8 oExtraTime, 0, .9, 5,tMinutes, .22, char_I_extra_time | |
| 498 OPTION_ENUM8 oBrightness, 3, 0, tEco, .23, opt_brightness | |
| 499 OPTION_UINT8 oDiveSalinity, 0, 4, 0, tPercent, .24, opt_salinity | |
| 500 OPTION_ENUM8 oCCRMode, 2, 0, tCCRModeFixedSP, .25, opt_ccr_mode | |
| 501 extern tDefName | |
| 502 OPTION_ENUM8 oLanguage, 4, 0, tEnglish, .26, opt_language | |
| 503 OPTION_ENUM8 oDateFormat, 3, 1, tDateformat,.27, opt_dateformat | |
| 504 OPTION_ENUM8 oUnits, 2, 0, tMetric, .28, opt_units ; 0=Meters, 1=Feets | |
| 505 | |
| 506 ;============================================================================= | |
| 507 ; Compass calibration data | |
| 508 OPTION_UINT8 oCalx0, 0,.255,.0, 0, .29, compass_CX_f+0 | |
| 509 OPTION_UINT8 oCalx1, 0,.255,.0, 0, .30, compass_CX_f+1 | |
| 510 OPTION_UINT8 oCaly0, 0,.255,.0, 0, .31, compass_CY_f+0 | |
| 511 OPTION_UINT8 oCaly1, 0,.255,.0, 0, .32, compass_CY_f+1 | |
| 512 OPTION_UINT8 oCalz0, 0,.255,.0, 0, .33, compass_CZ_f+0 | |
| 513 OPTION_UINT8 oCalz1, 0,.255,.0, 0, .34, compass_CZ_f+1 | |
| 514 | |
| 515 OPTION_ENUM8 oGas1, 3, 1, tGasDisabled, .35, opt_gas_type+0; 0=Disabled, 1=First, 2=Travel, 3=Deco | |
| 516 OPTION_ENUM8 oGas2, 3, 0, tGasDisabled, .36, opt_gas_type+1 | |
| 517 OPTION_ENUM8 oGas3, 3, 0, tGasDisabled, .37, opt_gas_type+2 | |
| 518 OPTION_ENUM8 oGas4, 3, 0, tGasDisabled, .38, opt_gas_type+3 | |
| 519 OPTION_ENUM8 oGas5, 3, 0, tGasDisabled, .39, opt_gas_type+4 | |
| 520 OPTION_UINT8 oGas1O2, .21,.100, .21, tPercent, .40, opt_gas_O2_ratio+0 | |
| 521 OPTION_UINT8 oGas1He, .1, .100, .0, tPercent, .41, opt_gas_He_ratio+0 | |
| 522 OPTION_UINT8 oGas2O2, .21,.100, .21, tPercent, .42, opt_gas_O2_ratio+1 | |
| 523 OPTION_UINT8 oGas2He, .1, .100, .0, tPercent, .43, opt_gas_He_ratio+1 | |
| 524 OPTION_UINT8 oGas3O2, .21,.100, .21, tPercent, .44, opt_gas_O2_ratio+2 | |
| 525 OPTION_UINT8 oGas3He, .1, .100, .0, tPercent, .45, opt_gas_He_ratio+2 | |
| 526 OPTION_UINT8 oGas4O2, .21,.100, .21, tPercent, .46, opt_gas_O2_ratio+3 | |
| 527 OPTION_UINT8 oGas4He, .1, .100, .0, tPercent, .47, opt_gas_He_ratio+3 | |
| 528 OPTION_UINT8 oGas5O2, .21,.100, .21, tPercent, .48, opt_gas_O2_ratio+4 | |
| 529 OPTION_UINT8 oGas5He, .1, .100, .0, tPercent, .49, opt_gas_He_ratio+4 | |
| 530 OPTION_UINT8 oGas1Depth, .0, .100, .0, tMeters, .50, char_I_deco_gas_change+0 | |
| 531 OPTION_UINT8 oGas2Depth, .0, .100, .0, tMeters, .51, char_I_deco_gas_change+1 | |
| 532 OPTION_UINT8 oGas3Depth, .0, .100, .0, tMeters, .52, char_I_deco_gas_change+2 | |
| 533 OPTION_UINT8 oGas4Depth, .0, .100, .0, tMeters, .53, char_I_deco_gas_change+3 | |
| 534 OPTION_UINT8 oGas5Depth, .0, .100, .0, tMeters, .54, char_I_deco_gas_change+4 | |
| 535 OPTION_UINT8 oDil1O2, .21,.100, .21, tPercent, .55, opt_dil_O2_ratio+0 | |
| 536 OPTION_UINT8 oDil1He, .1, .100, .0, tPercent, .56, opt_dil_He_ratio+0 | |
| 537 OPTION_UINT8 oDil2O2, .21,.100, .21, tPercent, .57, opt_dil_O2_ratio+1 | |
| 538 OPTION_UINT8 oDil2He, .1, .100, .0, tPercent, .58, opt_dil_He_ratio+1 | |
| 539 OPTION_UINT8 oDil3O2, .21,.100, .21, tPercent, .59, opt_dil_O2_ratio+2 | |
| 540 OPTION_UINT8 oDil3He, .1, .100, .0, tPercent, .60, opt_dil_He_ratio+2 | |
| 541 OPTION_UINT8 oDil4O2, .21,.100, .21, tPercent, .61, opt_dil_O2_ratio+3 | |
| 542 OPTION_UINT8 oDil4He, .1, .100, .0, tPercent, .62, opt_dil_He_ratio+3 | |
| 543 OPTION_UINT8 oDil5O2, .21,.100, .21, tPercent, .63, opt_dil_O2_ratio+4 | |
| 544 OPTION_UINT8 oDil5He, .1, .100, .0, tPercent, .64, opt_dil_He_ratio+4 | |
| 545 OPTION_UINT8 oSetPoint1, .20, .160, .70, tbar, .65, char_I_setpoint_cbar+0 | |
| 546 OPTION_UINT8 oSetPoint2, .20, .160, .90, tbar, .66, char_I_setpoint_cbar+1 | |
| 547 OPTION_UINT8 oSetPoint3, .20, .160, .100, tbar, .67, char_I_setpoint_cbar+2 | |
| 548 OPTION_UINT8 oSetPoint4, .20, .160, .120, tbar, .68, char_I_setpoint_cbar+3 | |
| 549 OPTION_UINT8 oSetPoint5, .20, .160, .140, tbar, .69, char_I_setpoint_cbar+4 | |
| 550 OPTION_UINT8 oSP1Depth, .0, .100, .0, tMeters, .70, char_I_setpoint_change+0 | |
| 551 OPTION_UINT8 oSP2Depth, .0, .100, .0, tMeters, .71, char_I_setpoint_change+1 | |
| 552 OPTION_UINT8 oSP3Depth, .0, .100, .0, tMeters, .72, char_I_setpoint_change+2 | |
| 553 OPTION_UINT8 oSP4Depth, .0, .100, .0, tMeters, .73, char_I_setpoint_change+3 | |
| 554 OPTION_UINT8 oSP5Depth, .0, .100, .0, tMeters, .74, char_I_setpoint_change+4 | |
| 555 OPTION_ENUM8 oDil1, 2, 1, tDilDisabled, .75, opt_dil_type+0 ; 0=Disabled, 1=First, 2=Normal | |
| 556 OPTION_ENUM8 oDil2, 2, 0, tDilDisabled, .76, opt_dil_type+1 | |
| 557 OPTION_ENUM8 oDil3, 2, 0, tDilDisabled, .77, opt_dil_type+2 | |
| 558 OPTION_ENUM8 oDil4, 2, 0, tDilDisabled, .78, opt_dil_type+3 | |
| 559 OPTION_ENUM8 oDil5, 2, 0, tDilDisabled, .79, opt_dil_type+4 | |
| 560 OPTION_UINT8 oDil1Depth, .0, .100, .0, tMeters, .80, char_I_dil_change+0 | |
| 561 OPTION_UINT8 oDil2Depth, .0, .100, .0, tMeters, .81, char_I_dil_change+1 | |
| 562 OPTION_UINT8 oDil3Depth, .0, .100, .0, tMeters, .82, char_I_dil_change+2 | |
| 563 OPTION_UINT8 oDil4Depth, .0, .100, .0, tMeters, .83, char_I_dil_change+3 | |
| 564 OPTION_UINT8 oDil5Depth, .0, .100, .0, tMeters, .84, char_I_dil_change+4 | |
| 565 OPTION_STRING oName, opt_name_length, tDefName, .85, opt_name | |
| 566 ; opt_name from 85 to 145 | |
| 567 | |
| 568 | |
| 569 ; Set Time/Set Date | |
| 570 OPTION_UINT8 oSetHours, .0, .23, .0, 0, -1, hours | |
| 571 OPTION_UINT8 oSetMinutes, .0, .59, .0, 0, -1, mins | |
| 572 OPTION_UINT8 oSetDay, .1, .31, .0, 0, -1, day | |
| 573 OPTION_UINT8 oSetMonth, .1, .12, .0, 0, -1, month | |
| 574 OPTION_UINT8 oSetYear, .13,.20, .0, 0, -1, year | |
| 575 | |
| 576 option_table_end: | |
| 577 END |
