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
+1
-1
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/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>
|
<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>
|
<title>Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-B056JgJR.js"></script>
|
<script type="module" crossorigin src="/assets/index-Da9ufxPv.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BcBTKEa5.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-BcBTKEa5.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -42,11 +42,10 @@ function centerOfPressure(corners) {
|
|||||||
const bottomRight = Math.max(0, finiteNumber(corners.bottomRight) || 0);
|
const bottomRight = Math.max(0, finiteNumber(corners.bottomRight) || 0);
|
||||||
const total = topLeft + topRight + bottomLeft + bottomRight;
|
const total = topLeft + topRight + bottomLeft + bottomRight;
|
||||||
|
|
||||||
// An empty board naturally has tiny load-cell noise. Keep the marker centered
|
// Only an exact zero stays centered because dividing by zero cannot produce a
|
||||||
// and subdued until there is enough weight for its position to mean anything;
|
// position. Every positive reading participates immediately, with no minimum
|
||||||
// once loaded, map the normalized left/right and top/bottom balance into the
|
// weight or center deadzone hiding small shifts reported by the load cells.
|
||||||
// safe interior of the load map.
|
if (total === 0) return { left: 50, top: 50, active: false };
|
||||||
if (total < 0.5) return { left: 50, top: 50, active: false };
|
|
||||||
const horizontal = ((topRight + bottomRight) - (topLeft + bottomLeft)) / total;
|
const horizontal = ((topRight + bottomRight) - (topLeft + bottomLeft)) / total;
|
||||||
const vertical = ((bottomLeft + bottomRight) - (topLeft + topRight)) / total;
|
const vertical = ((bottomLeft + bottomRight) - (topLeft + topRight)) / total;
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user