Skip to content

Commit

Permalink
Fix typos (#1508)
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Turner <[email protected]>
  • Loading branch information
spacey-sooty authored Nov 2, 2024
1 parent 7a4ea3d commit 75e2498
Show file tree
Hide file tree
Showing 28 changed files with 40 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you're cross-compiling, you'll need the wpilib toolchain installed. This can

## Out-of-Source Dependencies

PhotonVision uses the following additonal out-of-source repositories for building code.
PhotonVision uses the following additional out-of-source repositories for building code.

- Base system images for Raspberry Pi & Orange Pi: https://github.com/PhotonVision/photon-image-modifier
- C++ driver for Raspberry Pi CSI cameras: https://github.com/PhotonVision/photon-libcamera-gl-driver
Expand Down
2 changes: 1 addition & 1 deletion docs/source/docs/contributing/building-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The built documentation is located at `docs/build/html/index.html` relative to t

## Docs Builds on Pull Requests

Pre-merge builds of docs can be found at: `https://photonvision-docs--PRNUMBER.org.readthedocs.build/en/PRNUMBER/index.html`. These docs are republished on every commit to a pull request made to PhotonVision/photonvision-docs. For example, PR 325 would have pre-merge documentation published to `https://photonvision-docs--325.org.readthedocs.build/en/325/index.html`. Additionally, the pull requrest will have a link directly to the pre-release build of the docs. This build only runs when there is a change to files in the docs sub-folder.
Pre-merge builds of docs can be found at: `https://photonvision-docs--PRNUMBER.org.readthedocs.build/en/PRNUMBER/index.html`. These docs are republished on every commit to a pull request made to PhotonVision/photonvision-docs. For example, PR 325 would have pre-merge documentation published to `https://photonvision-docs--325.org.readthedocs.build/en/325/index.html`. Additionally, the pull request will have a link directly to the pre-release build of the docs. This build only runs when there is a change to files in the docs sub-folder.

## Style Guide

Expand Down
2 changes: 1 addition & 1 deletion docs/source/docs/installation/sw_install/raspberry-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A Pre-Built Raspberry Pi image is available for ease of installation.
Download the latest release of the PhotonVision Raspberry image (.xz file) from the [releases page](https://github.com/PhotonVision/photonvision/releases). You do not need to extract the downloaded ZIP file.

:::{note}
Make sure you download the image that ends in '-RasberryPi.xz'.
Make sure you download the image that ends in '-RaspberryPi.xz'.
:::

## Flashing the Pi Image
Expand Down
2 changes: 1 addition & 1 deletion photon-client/src/types/SettingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export interface CameraCalibrationResult {
distCoeffs: JsonMatOfDouble;
observations: BoardObservation[];
calobjectWarp?: number[];
// We might have to omit observations for bandwith, so backend will send us this
// We might have to omit observations for bandwidth, so backend will send us this
numSnapshots: number;
meanErrors: number[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ public File getModelsDirectory() {

/**
* Disable flushing settings to disk as part of our JVM exit hook. Used to prevent uploading all
* settings from getting its new configs overwritten at program exit and before theyre all loaded.
* settings from getting its new configs overwritten at program exit and before they're all
* loaded.
*/
public void disableFlushOnShutdown() {
this.flushOnShutdown = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public enum PigpioCommand {
PCMD_WVDEL(50), // int wave_delete(unsigned wave_id)
PCMD_WVTX(51), // int wave_tx_send(unsigned wave_id) (once)
PCMD_WVTXR(52), // int wave_tx_send(unsigned wave_id) (repeat)
PCMD_GDC(83), // int get_duty_cyle(unsigned user_gpio)
PCMD_GDC(83), // int get_duty_cycle(unsigned user_gpio)
PCMD_HP(86), // int hardware_pwm(unsigned gpio, unsigned PWMfreq, unsigned PWMduty)
PCMD_WVTXM(100); // int wave_tx_send(unsigned wave_id, unsigned wave_mode)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void initCmds(HardwareConfig config) {
// CPU Temperature
/* The RK3588 chip has 7 thermal zones that can be accessed via:
* /sys/class/thermal/thermal_zoneX/temp
* where X is an interger from 0 to 6.
* where X is an integer from 0 to 6.
*
* || Zone || Location || Comments ||
* | 0 | soc | soc thermal (near the center of the chip) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private QuirkyCamera(int usbVid, int usbPid, String baseName, CameraQuirk... qui
* @param usbVid USB VID of camera
* @param usbPid USB PID of camera
* @param baseName CSCore name of camera
* @param displayName Human-friendly quicky camera name
* @param displayName Human-friendly quirky camera name
* @param quirks Camera quirks
*/
private QuirkyCamera(
Expand All @@ -160,7 +160,7 @@ private QuirkyCamera(
this.quirks.put(q, true);
}

// (2) for all other quirks in CameraQuirks (in this version of Photon), defalut to false
// (2) for all other quirks in CameraQuirks (in this version of Photon), default to false
for (var q : CameraQuirk.values()) {
this.quirks.putIfAbsent(q, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,17 @@ private String getMatchData() {
var matchType = ntMatchType.getAtomic();
if (matchType.timestamp == 0) {
// no NT info yet
logger.warn("Did not recieve match type, defaulting to 0");
logger.warn("Did not receive match type, defaulting to 0");
}

var matchNum = ntMatchNum.getAtomic();
if (matchNum.timestamp == 0) {
logger.warn("Did not recieve match num, defaulting to -1");
logger.warn("Did not receive match num, defaulting to -1");
}

var eventName = ntEventName.getAtomic();
if (eventName.timestamp == 0) {
logger.warn("Did not recieve event name, defaulting to 'UNKNOWN'");
logger.warn("Did not receive event name, defaulting to 'UNKNOWN'");
}

String matchTypeStr =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private List<Point> detectExtremeCornersByApproxPolyDp(TrackedTarget target, boo
var compareDistToTr =
Comparator.comparingDouble((Point p) -> distanceBetween(p, boundingBoxCorners.get(2)));

// top left and top right are the poly corners closest to the bouding box tl and tr
// top left and top right are the poly corners closest to the bounding box tl and tr
pointList.sort(compareDistToTl);
var tl = pointList.get(0);
pointList.remove(tl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ public void changePipelineType(int newType) {
var oldSettings = userPipelineSettings.get(idx);

var name = getCurrentPipelineSettings().pipelineNickname;
// Dummy settings to copy common fileds over
// Dummy settings to copy common fields over
var newSettings = createSettingsForType(type, name);

// Copy all fields from AdvancedPipelineSettings/its superclasses from old to new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ public void setIgnoredCamerasRegex(String ignoredCamerasRegex) {
* Filter out any blacklisted or ignored devices.
*
* @param allDevices
* @return list of devices with blacklisted or ingore devices removed.
* @return list of devices with blacklisted or ignore devices removed.
*/
private List<CameraInfo> filterAllowedDevices(List<CameraInfo> allDevices) {
List<CameraInfo> filteredDevices = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public CameraConfiguration getConfiguration() {
public abstract void setGain(int gain);

// Pretty uncommon so instead of abstract this is just a no-op by default
// Overriden by cameras with AWB gain support
// Overriddenn by cameras with AWB gain support
public void setRedGain(int red) {}

public void setBlueGain(int blue) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public static void calibrateCommon(
}

/**
* Uses a given camera coefficents matrix set to "undistort" every image file found in a given
* Uses a given camera coefficientss matrix set to "undistort" every image file found in a given
* directory and display them. Provides an easy way to visually debug the results of the
* calibration routine. Seems to play havoc with CI and takes a chunk of time, so shouldn't
* usually be left active in tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void testUndistortImagePointsWithRotation(@Enum ImageRotationMode rot) {

Point[] originalPoints = {new Point(100, 100), new Point(200, 200), new Point(300, 100)};

// Distort the origional points
// Distort the origonal points
var distortedOriginalPoints =
OpenCVHelp.distortPoints(
List.of(originalPoints),
Expand All @@ -153,14 +153,14 @@ public void testUndistortImagePointsWithRotation(@Enum ImageRotationMode rot) {
.collect(Collectors.toList());

// Now let's instead rotate then distort
var rotatedOrigionalPoints =
var rotatedOriginalPoints =
Arrays.stream(originalPoints)
.map(it -> rot.rotatePoint(it, frameProps.imageWidth, frameProps.imageHeight))
.collect(Collectors.toList());

var distortedRotatedPoints =
OpenCVHelp.distortPoints(
rotatedOrigionalPoints,
rotatedOriginalPoints,
rotatedFrameProps.cameraCalibration.getCameraIntrinsicsMat(),
rotatedFrameProps.cameraCalibration.getDistCoeffsMat());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public void testDisableInhibitPathChangeIdenticalCams() {
new CameraConfiguration(
"Arducam OV2311 USB Camera",
"Arducam OV2311 USB Camera",
"fromt-left",
"front-left",
"/dev/video0",
CAM1_OLD_PATHS);
camera1_saved_config.usbVID = 3141;
Expand All @@ -306,7 +306,7 @@ public void testDisableInhibitPathChangeIdenticalCams() {
new CameraConfiguration(
"Arducam OV2311 USB Camera",
"Arducam OV2311 USB Camera (1)",
"fromt-left",
"front-left",
"/dev/video2",
CAM2_OLD_PATH);
camera2_saved_config.usbVID = 3141;
Expand Down Expand Up @@ -362,7 +362,7 @@ public void testInhibitPathChangeIdenticalCams() {
new CameraConfiguration(
"Arducam OV2311 USB Camera",
"Arducam OV2311 USB Camera (1)",
"fromt-left",
"front-left",
"/dev/video0",
CAM1_OLD_PATHS);
camera1_saved_config.usbVID = 3141;
Expand All @@ -371,7 +371,7 @@ public void testInhibitPathChangeIdenticalCams() {
new CameraConfiguration(
"Arducam OV2311 USB Camera",
"Arducam OV2311 USB Camera (1)",
"fromt-left",
"front-left",
"/dev/video2",
CAM2_OLD_PATH);
camera2_saved_config.usbVID = 3141;
Expand Down Expand Up @@ -571,7 +571,7 @@ public void testIdenticalCameras() {
ret1.stream().filter(it -> thisName.equals(it.cameraConfiguration.uniqueName)).count());
}

// duplciate cameras, same info, new ref
// duplicate cameras, same info, new ref
var duplicateCameraInfos = new ArrayList<CameraInfo>();
CameraInfo info1_dup =
new CameraInfo(
Expand Down Expand Up @@ -609,7 +609,7 @@ public void testIdenticalCameras() {
assertTrue(inst.knownCameras.contains(info2_dup));
assertEquals(2, inst.knownCameras.size());

// duplciate cameras this simulates unplugging one and plugging the other in where v4l assigns
// duplicate cameras this simulates unplugging one and plugging the other in where v4l assigns
// the same by-id path to the other camera
var duplicateCameraInfos1 = new ArrayList<CameraInfo>();
CameraInfo info3_dup =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ private Optional<EstimatedRobotPose> multiTagOnCoprocStrategy(PhotonPipelineResu
result.getTargets(),
PoseStrategy.MULTI_TAG_PNP_ON_COPROCESSOR));
} else {
// We can nver fall back on another multitag strategy
// We can never fall back on another multitag strategy
return update(result, Optional.empty(), Optional.empty(), this.multiTagFallbackStrategy);
}
}
Expand Down
2 changes: 1 addition & 1 deletion photon-lib/src/test/java/org/photonvision/OpenCVTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void testProjection() {
assertEquals(
actualRelation.camToTargPitch.getDegrees(),
pitchDiff.getDegrees()
* Math.cos(yaw2d.getRadians()), // adjust for unaccounted perpsective distortion
* Math.cos(yaw2d.getRadians()), // adjust for unaccounted perspective distortion
kRotDeltaDeg,
"2d pitch doesn't match 3d");
assertEquals(
Expand Down
2 changes: 1 addition & 1 deletion photon-serde/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Like Rosmsg. But worse.
The code for a single type is split across 3 files. Let's look at PnpResult:
- [The struct definition](src/struct/pnpresult_struct.h): This is the data the object holds. Auto-generated. The data this object holds can be primitives or other, fully-deserialized types (like Vec2)
- [The user class](src/targeting/pnpresult_struct.h): This is the fully-deserialized PnpResult type. This contains extra functions users might need to expose like `Amgiguity`, or other computed helper things.
- [The serde interface](src/serde/pnpresult_struct.h): This is a template specilization for converting the user class to/from bytes
- [The serde interface](src/serde/pnpresult_struct.h): This is a template specialization for converting the user class to/from bytes

## Prior art

Expand Down
2 changes: 1 addition & 1 deletion photon-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ remotes {
task findDeployTarget {
doLast {
if(project.hasProperty('tgtIP')){
//If user specificed IP, default to using the PI profile
//If user specified IP, default to using the PI profile
// but adjust hostname to match the provided IP address
findDeployTarget.ext.rmt = remotes.pi
findDeployTarget.ext.rmt.host=tgtIP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public static List<TargetCorner> pointsToCorners(MatOfPoint2f matInput) {
* @param <T> Element type
* @param elements list elements
* @param backwards If indexing should happen in reverse (0, size-1, size-2, ...)
* @param shiftStart How much the inital index should be shifted (instead of starting at index 0,
* @param shiftStart How much the initial index should be shifted (instead of starting at index 0,
* start at shiftStart, negated if backwards)
* @return Reordered list
*/
Expand Down Expand Up @@ -257,7 +257,7 @@ private static Translation3d translationNWUtoEDN(Translation3d trl) {
*
* @param pointsList the undistorted points
* @param cameraMatrix standard OpenCV camera mat
* @param distCoeffs standard OpenCV distortion coefficeints. Must OPENCV5 or OPENCV8
* @param distCoeffs standard OpenCV distortion coefficients. Must OPENCV5 or OPENCV8
*/
public static List<Point> distortPoints(
List<Point> pointsList, Mat cameraMatrix, Mat distCoeffs) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public float getDetectedObjectConfidence() {
}

/**
* Get the ratio of best:alternate pose reprojection errors, called ambiguity. This is betweeen 0
* Get the ratio of best:alternate pose reprojection errors, called ambiguity. This is between 0
* and 1 (0 being no ambiguity, and 1 meaning both have the same reprojection error). Numbers
* above 0.2 are likely to be ambiguous. -1 if invalid.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class PhotonPipelineResult : public PhotonPipelineResult_PhotonStruct {
PhotonPipelineResult() : Base() {}
explicit PhotonPipelineResult(Base&& data) : Base(data) {}

// Don't forget to deal with our ntRecieveTimestamp
// Don't forget to deal with our ntReceiveTimestamp
PhotonPipelineResult(const PhotonPipelineResult& other)
: Base(other), ntReceiveTimestamp(other.ntReceiveTimestamp) {}
PhotonPipelineResult(PhotonPipelineResult& other)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class PhotonTrackedTarget : public PhotonTrackedTarget_PhotonStruct {

/**
* Get the ratio of best:alternate pose reprojection errors, called ambiguity.
* This is betweeen 0 and 1 (0 being no ambiguity, and 1 meaning both have the
* This is between 0 and 1 (0 being no ambiguity, and 1 meaning both have the
* same reprojection error). Numbers above 0.2 are likely to be ambiguous. -1
* if invalid.
*/
Expand Down
2 changes: 1 addition & 1 deletion photonlib-cpp-examples/aimandrange/src/main/cpp/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void Robot::TeleopPeriodic() {
targetRange = photon::PhotonUtils::CalculateDistanceToTarget(
0.5_m, // Measured with a tape measure, or in CAD
1.435_m, // From 2024 game manual for ID 7
-30.0_deg, // Measured witha protractor, or in CAD
-30.0_deg, // Measured with a protractor, or in CAD
units::degree_t{target.GetPitch()});
targetVisible = true;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/generatePiImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ then
exit 1
fi

echo "Unziped image: " $IMAGE_FILE " -- mounting"
echo "Unzipped image: " $IMAGE_FILE " -- mounting"
TMP=$(mktemp -d)
LOOP=$(sudo losetup --show -fP "${IMAGE_FILE}")
echo "Image mounted! Copying jar..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ systemctl stop photonvision
systemctl disable photonvision
rm /lib/systemd/system/photonvision.service
rm /etc/systemd/system/photonvision.service
systemctl dameon-relaod
systemctl daemeon-reload
systemctl reset-failed
2 changes: 1 addition & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ curl -sk https://api.github.com/repos/photonvision/photonvision/releases/latest
echo "Starting PhotonVision service"
systemctl start photonvision

echo "PhotonVision update succesful!"
echo "PhotonVision update successful!"

0 comments on commit 75e2498

Please sign in to comment.