mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-30 02:31:40 +00:00
Upgrade to wpilib alpha-6 (#2434)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ryanforce08 <rradtke1208@gmail.com> Co-authored-by: PJ Reiniger <pj.reiniger@gmail.com> Co-authored-by: Jade Turner <spacey-sooty@proton.me> Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
This commit is contained in:
@@ -19,7 +19,7 @@ import struct
|
||||
from typing import Generic, Optional, Protocol, TypeVar
|
||||
|
||||
import wpilib
|
||||
from wpimath.geometry import Quaternion, Rotation3d, Transform3d, Translation3d
|
||||
from wpimath import Quaternion, Rotation3d, Transform3d, Translation3d
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
@@ -57,17 +57,16 @@ class Packet:
|
||||
"""
|
||||
|
||||
def _getNextByteAsInt(self) -> int:
|
||||
retVal = 0x00
|
||||
|
||||
if not self.outOfBytes:
|
||||
try:
|
||||
retVal = 0x00FF & self.packetData[self.readPos]
|
||||
self.readPos += 1
|
||||
return retVal
|
||||
except IndexError:
|
||||
wpilib.reportError(Packet._NO_MORE_BYTES_MESSAGE, True)
|
||||
self.outOfBytes = True
|
||||
|
||||
return retVal
|
||||
return 0x00
|
||||
|
||||
def getData(self) -> bytes:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user