FRC1076 / FRC1076/2019-Competition

Fix circular deadzone implementation so it rounds for both negative and positive cases.

Open
#7 0 comments 0 reactions 1 assignee Claimed by @2021GozonMarcusc View on GitHub
Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

In the code you have the round() function at the wrong indentation level. It needs to apply to either case (afterward).

if x < 0:
nx = (x + radius)/(1-radius)
else:
nx = (x - radius)/(1 - radius)
nx = round(nx, 2)
return(nx,0)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.