mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
slop
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -78,7 +78,7 @@
|
||||
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script>
|
||||
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script>
|
||||
<title>Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-DzMZA-qn.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-3ekGrBk9.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DzqCFmyF.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -421,6 +421,10 @@ function createOvercurrentProtectionService(options = {}) {
|
||||
if (state.driveBlocked) return 'stopped';
|
||||
const anyLimited = MOTOR_KEYS.some((key) => state.motors[key].cap < 1);
|
||||
if (anyLimited && anyOvercurrent) return 'limiting';
|
||||
// The raw Roomba flag is useful operator information even while stress is
|
||||
// still inside the transient grace region. Reporting it separately keeps
|
||||
// HUD visibility immediate without falsely claiming output is being scaled.
|
||||
if (anyOvercurrent) return 'overcurrent';
|
||||
if (anyLimited) return 'recovering';
|
||||
return 'idle';
|
||||
}
|
||||
|
||||
@@ -50,7 +50,9 @@ test('a short stalled-wheel spike remains inside the grace region', () => {
|
||||
|
||||
assert.equal(snapshot.motors.leftWheel.stress, 0.025);
|
||||
assert.equal(snapshot.motors.leftWheel.cap, 1);
|
||||
assert.equal(snapshot.status, 'idle');
|
||||
// The hardware event is visible immediately even though the grace region
|
||||
// correctly leaves the command cap at full output.
|
||||
assert.equal(snapshot.status, 'overcurrent');
|
||||
});
|
||||
|
||||
test('persistent stalled-wheel overcurrent scales both wheels and then stops drive', () => {
|
||||
|
||||
@@ -40,7 +40,9 @@ function OvercurrentOverlay({ roverId = null, overcurrentLimiter = null, compact
|
||||
? 'Drive stopped'
|
||||
: status === 'recovering'
|
||||
? 'Protection recovering'
|
||||
: 'Overcurrent limiting';
|
||||
: status === 'limiting'
|
||||
? 'Overcurrent limiting'
|
||||
: 'Overcurrent detected';
|
||||
const detail = bypassed
|
||||
? 'Admin bypass'
|
||||
: stopped && protection?.drive?.requiresNeutral
|
||||
|
||||
@@ -35,6 +35,7 @@ function statusLabel(protection) {
|
||||
if (protection?.adminImmune) return 'Admin bypass';
|
||||
if (protection?.status === 'stopped') return 'Drive stopped';
|
||||
if (protection?.status === 'limiting') return 'Limiting';
|
||||
if (protection?.status === 'overcurrent') return 'Overcurrent detected';
|
||||
if (protection?.status === 'recovering') return 'Recovering';
|
||||
return 'Ready';
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ export function useOvercurrentLimiter(roverId) {
|
||||
},
|
||||
overcurrent: { motors: motorFlags, groups: groupFlags },
|
||||
isActive: protection?.status === 'limiting'
|
||||
|| protection?.status === 'overcurrent'
|
||||
|| protection?.status === 'stopped'
|
||||
|| protection?.status === 'recovering',
|
||||
adminImmune,
|
||||
|
||||
Reference in New Issue
Block a user