Compare commits

..

4 Commits

2 changed files with 7 additions and 9 deletions

View File

@ -371,7 +371,7 @@ class MainWindow(QtWidgets.QMainWindow):
{'name': 'LD Power Limit', 'type': 'float', 'value': 0, 'step': 0.001, 'decimals': 6, 'limits': (0, float("inf")), {'name': 'LD Power Limit', 'type': 'float', 'value': 0, 'step': 0.001, 'decimals': 6, 'limits': (0, float("inf")),
'unit': 'mW', 'lock': False, 'target': 'laser', 'action': 'set_ld_pwr_limit'}, 'unit': 'mW', 'lock': False, 'target': 'laser', 'action': 'set_ld_pwr_limit'},
{'name': 'Responsitivity', 'type': 'float', 'value': 0, 'step': 0.001, 'decimals': 6, 'limits': (0, float("inf")), {'name': 'Responsitivity', 'type': 'float', 'value': 0, 'step': 0.001, 'decimals': 6, 'limits': (0, float("inf")),
'unit': 'mA/W', 'lock': False, 'target': 'laser', 'action': 'set_pd_mon_responsitivity'}, 'unit': 'mA/W', 'siPrefix': True, 'lock': False, 'target': 'laser', 'action': 'set_pd_mon_responsitivity'},
{'name': 'Dark Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, float("inf")), {'name': 'Dark Current', 'type': 'float', 'value': 0, 'step': 1, 'decimals': 6, 'limits': (0, float("inf")),
'unit': 'uA', 'lock': False, 'target': 'laser', 'action': 'set_pd_mon_dark_current'}, 'unit': 'uA', 'lock': False, 'target': 'laser', 'action': 'set_pd_mon_dark_current'},
]}, ]},

View File

@ -211,14 +211,12 @@ impl LdPwrExcProtector {
pub fn pwr_on_and_arm_protection() { pub fn pwr_on_and_arm_protection() {
if let Some(ref mut wdg) = LdPwrExcProtector::get() { if let Some(ref mut wdg) = LdPwrExcProtector::get() {
if !wdg.alarm_status.pwr_excursion { wdg.alarm_status = Status::default();
wdg.alarm_status = Status::default(); LdPwrExcProtector::clear_interrupt_bit();
LdPwrExcProtector::clear_interrupt_bit(); LdPwrExcProtector::pwr_on();
LdPwrExcProtector::pwr_on(); // Interrupt should be enabled after power on to tackle the following edge case:
// Interrupt should be enabled after power on to tackle the following edge case: // Pd_Mon pin voltage has already exceed threshold before LD Power is on.
// Pd_Mon pin voltage has already exceed threshold before LD Power is on. LdPwrExcProtector::enable_watchdog_interrupt();
LdPwrExcProtector::enable_watchdog_interrupt();
}
} }
} }