Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
get reset yaw angle from nt value
Browse files Browse the repository at this point in the history
  • Loading branch information
dublUayaychtee committed Mar 17, 2024
1 parent 8ff8704 commit f545fe7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rio/commands/ResetYaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging

from subsystems.drivesubsystem import DriveSubsystem
from ntcore import NetworkTableInstance


class ResetYaw(commands2.Command):
Expand All @@ -12,12 +13,16 @@ def __init__(
):
super().__init__()

# Configure networktables
self.nt = NetworkTableInstance.getDefault()
self.sd = self.nt.getTable("SmartDashboard")

# local subsystem instance
self.subsystem = _drivetrain
self.angle = angle

def initialize(self):
self.subsystem.resetYaw(self.angle)
print("i b setn' 0 t' " + str(self.sd.getNumber("Auto/Angle", 1)))
self.subsystem.resetYaw(self.sd.getNumber("Auto/Angle", 1))

def execute(self):
pass
Expand Down

0 comments on commit f545fe7

Please sign in to comment.