Skip to content

Commit 880ebdf

Browse files
committed
Fix serve http-server cors; Flip sense_obstacle()
1 parent cbf04ac commit 880ebdf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"prepare": "husky",
3636
"postinstall": "patch-package && yarn scripts:build",
3737
"scripts": "node --max-old-space-size=4096 scripts/dist/bin.js",
38-
"serve": "http-server --cors=* -c-1 -p 8022 ./build",
38+
"serve": "http-server --cors -c-1 -p 8022 ./build",
3939
"template": "yarn scripts template",
4040
"test": "yarn scripts test",
4141
"test:all": "yarn test && yarn scripts:test",

src/bundles/robot_minigame/functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const SENSOR_RANGE: number = 15;
247247
* Check if there is an obstacle within a predefined distance from the robot
248248
*/
249249
export function sense_obstacle() : boolean {
250-
return get_distance() > SENSOR_RANGE;
250+
return get_distance() < SENSOR_RANGE;
251251
}
252252

253253
/**

0 commit comments

Comments
 (0)