void settings_default() { timer.setDefault(); strcpy((char*)conf.sysName, " "); conf.warnTime = 2; conf.mirrorTime = 2; conf.cameraFPS = 33; conf.bulbMode = 0; conf.lcdColor = 0; conf.cameraMake = CANON; conf.settingsVersion = SETTINGS_VERSION; conf.shutterVersion = SHUTTER_VERSION; conf.lcdBacklightTime = 3; conf.sysOffTime = 12; conf.flashlightOffTime = 3; conf.devMode = 0; conf.auxPort = AUX_MODE_DISABLED; conf.btMode = BT_MODE_SLEEP; conf.halfPress = HALF_PRESS_ENABLED; conf.bulbOffset = 75; conf.interface = INTERFACE_AUTO; conf.brampMode = BRAMP_MODE_BULB_ISO; conf.autoRun = AUTO_RUN_OFF; conf.modeSwitch = USB_CHANGE_MODE_DISABLED; conf.dollyPulse = 100; conf.lcdContrast = 0xf; conf.lcdCoefficent = 0x7; conf.lcdBias = 0x4; conf.bulbMin = 56; conf.isoMax = 10; conf.apertureMax = 31; conf.apertureMin = 2; settings_save(); settings_load(); }
void settings_default() { timer.setDefault(); strcpy((char*)conf.sysName, " "); conf.warnTime = 2; conf.mirrorTime = 2; conf.lcdColor = 0; conf.settingsVersion = SETTINGS_VERSION; conf.shutterVersion = SHUTTER_VERSION; conf.lcdBacklightTime = 3; conf.sysOffTime = 12; conf.flashlightOffTime = 3; conf.devMode = 0; conf.auxPort = AUX_MODE_DISABLED; conf.btMode = BT_MODE_SLEEP; conf.brampMode = BRAMP_MODE_BULB_ISO; conf.autoRun = AUTO_RUN_OFF; conf.dollyPulse = 100; conf.dollyPulse2 = 100; conf.lcdContrast = 3; conf.lcdCoefficent = 0x7; conf.lcdBias = 0x3; conf.isoMax = 10; conf.apertureMax = 31; conf.apertureMin = 2; conf.debugEnabled = 0; conf.arbitraryBulb = 0; conf.menuWrap = 1; conf.extendedRamp = 0; strcpy((char*)conf.test, "Test "); conf.lightIntegrationMinutes = 5; conf.pFactor = 10; conf.iFactor = 12; conf.dFactor = 12; conf.errorAlert = 0; conf.lightThreshold = 20; conf.linearInterpolation = 0; conf.camera.cameraFPS = 33; conf.camera.nikonUSB = 0; conf.camera.bulbEndOffset = 8; conf.camera.bulbMin = 56; conf.camera.bulbOffset = 75; conf.camera.negBulbOffset = 0; conf.camera.interface = INTERFACE_AUTO; conf.camera.cameraMake = CANON; conf.camera.bulbMode = 0; conf.camera.halfPress = HALF_PRESS_ENABLED; conf.camera.modeSwitch = USB_CHANGE_MODE_DISABLED; conf.camera.brampGap = 6; for(uint8_t i = 0; i < MAX_CAMERAS_SETTINGS; i++) { camera_settings_t cs; memset((void*)&cs, 0, sizeof(camera_settings_t)); eeprom_write_block((const void*)&cs, &camera_settings_eep[i], sizeof(camera_settings_t)); } settings_save(); settings_load(); }
void settings_init() { settings_load(); uint8_t need_save = 0; if(conf.shutterVersion != SHUTTER_VERSION) { timer.setDefault(); conf.shutterVersion = SHUTTER_VERSION; need_save = 1; } if(conf.settingsVersion != SETTINGS_VERSION) { settings_default(); need_save = 0; settings_reset = 1; // This is where we'd put a setup wizard } if(need_save) settings_save(); }
void settings_init() { settings_load(); if(eeprom_read_byte((const uint8_t *) &conf_eep) == 255 || conf.version != VERSION) { timer.setDefault(); strcpy((char *)conf.sysName, "sys01"); conf.warnTime = 2; conf.mirrorTime = 2; conf.cameraFPS = 34; conf.bulbMode = 0; conf.lcdColor = 0; conf.cameraMake = CANON; conf.version = VERSION; conf.lcdBacklightTime = 3; conf.sysOffTime = 12; conf.flashlightOffTime = 3; settings_save(); } settings_load(); }