@@ -413,45 +413,47 @@ impl DutPwrThread {
413
413
. swap ( OutputRequest :: Idle as u8 , Ordering :: Relaxed )
414
414
. into ( ) ;
415
415
416
- // Don't even look at the requests if there is an ongoing
417
- // overvoltage condition. Instead turn the output off and
418
- // go back to measuring.
419
- if volt > MAX_VOLTAGE {
420
- turn_off_with_reason (
421
- OutputState :: OverVoltage ,
422
- & pwr_line,
423
- & discharge_line,
424
- & state,
425
- ) ;
426
-
427
- continue ;
428
- }
416
+ {
417
+ // Don't even look at the requests if there is an ongoing
418
+ // overvoltage condition. Instead turn the output off and
419
+ // go back to measuring.
420
+ if volt > MAX_VOLTAGE {
421
+ turn_off_with_reason (
422
+ OutputState :: OverVoltage ,
423
+ & pwr_line,
424
+ & discharge_line,
425
+ & state,
426
+ ) ;
429
427
430
- // Don't even look at the requests if there is an ongoin
431
- // polarity inversion. Turn off, go back to start, do not
432
- // collect $200.
433
- if volt < MIN_VOLTAGE {
434
- turn_off_with_reason (
435
- OutputState :: InvertedPolarity ,
436
- & pwr_line,
437
- & discharge_line,
438
- & state,
439
- ) ;
440
-
441
- continue ;
442
- }
428
+ continue ;
429
+ }
443
430
444
- // Don't even look at the requests if there is an ongoin
445
- // overcurrent condition.
446
- if curr > MAX_CURRENT {
447
- turn_off_with_reason (
448
- OutputState :: OverCurrent ,
449
- & pwr_line,
450
- & discharge_line,
451
- & state,
452
- ) ;
453
-
454
- continue ;
431
+ // Don't even look at the requests if there is an ongoin
432
+ // polarity inversion. Turn off, go back to start, do not
433
+ // collect $200.
434
+ if volt < MIN_VOLTAGE {
435
+ turn_off_with_reason (
436
+ OutputState :: InvertedPolarity ,
437
+ & pwr_line,
438
+ & discharge_line,
439
+ & state,
440
+ ) ;
441
+
442
+ continue ;
443
+ }
444
+
445
+ // Don't even look at the requests if there is an ongoin
446
+ // overcurrent condition.
447
+ if curr > MAX_CURRENT {
448
+ turn_off_with_reason (
449
+ OutputState :: OverCurrent ,
450
+ & pwr_line,
451
+ & discharge_line,
452
+ & state,
453
+ ) ;
454
+
455
+ continue ;
456
+ }
455
457
}
456
458
457
459
// There is no ongoing fault condition, so we could e.g. turn
0 commit comments