Compare commits
4 Commits
3f9a4bf140
...
98d577bed5
Author | SHA1 | Date |
---|---|---|
linuswck | 98d577bed5 | |
linuswck | b84cf77805 | |
linuswck | 49cff8e2a3 | |
linuswck | 73796a4728 |
|
@ -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")),
|
||||
'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")),
|
||||
'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")),
|
||||
'unit': 'uA', 'lock': False, 'target': 'laser', 'action': 'set_pd_mon_dark_current'},
|
||||
]},
|
||||
|
|
|
@ -211,14 +211,12 @@ impl LdPwrExcProtector {
|
|||
|
||||
pub fn pwr_on_and_arm_protection() {
|
||||
if let Some(ref mut wdg) = LdPwrExcProtector::get() {
|
||||
if !wdg.alarm_status.pwr_excursion {
|
||||
wdg.alarm_status = Status::default();
|
||||
LdPwrExcProtector::clear_interrupt_bit();
|
||||
LdPwrExcProtector::pwr_on();
|
||||
// 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.
|
||||
LdPwrExcProtector::enable_watchdog_interrupt();
|
||||
}
|
||||
wdg.alarm_status = Status::default();
|
||||
LdPwrExcProtector::clear_interrupt_bit();
|
||||
LdPwrExcProtector::pwr_on();
|
||||
// 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.
|
||||
LdPwrExcProtector::enable_watchdog_interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue