Signed-off-by: Jade Turner <spacey-sooty@proton.me>
This commit is contained in:
Jade
2024-11-02 11:51:16 +08:00
committed by GitHub
parent 7a4ea3dd56
commit 75e2498f53
28 changed files with 40 additions and 39 deletions

View File

@@ -340,7 +340,8 @@ public class ConfigManager {
/**
* 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;

View File

@@ -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)

View File

@@ -27,7 +27,7 @@ public class RK3588Cmds extends LinuxCmds {
// 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) |

View File

@@ -143,7 +143,7 @@ public class QuirkyCamera {
* @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(
@@ -160,7 +160,7 @@ public class 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);
}

View File

@@ -152,17 +152,17 @@ public class FileSaveFrameConsumer implements Consumer<CVMat> {
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 =

View File

@@ -140,7 +140,7 @@ public class CornerDetectionPipe
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);

View File

@@ -512,7 +512,7 @@ public class PipelineManager {
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

View File

@@ -535,7 +535,7 @@ public class VisionSourceManager {
* 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<>();

View File

@@ -59,7 +59,7 @@ public abstract class VisionSourceSettables {
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) {}

View File

@@ -287,7 +287,7 @@ public class Calibrate3dPipeTest {
}
/**
* 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.

View File

@@ -139,7 +139,7 @@ public class CalibrationRotationPipeTest {
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),
@@ -153,14 +153,14 @@ public class CalibrationRotationPipeTest {
.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());

View File

@@ -297,7 +297,7 @@ public class VisionSourceManagerTest {
new CameraConfiguration(
"Arducam OV2311 USB Camera",
"Arducam OV2311 USB Camera",
"fromt-left",
"front-left",
"/dev/video0",
CAM1_OLD_PATHS);
camera1_saved_config.usbVID = 3141;
@@ -306,7 +306,7 @@ public class VisionSourceManagerTest {
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;
@@ -362,7 +362,7 @@ public class VisionSourceManagerTest {
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;
@@ -371,7 +371,7 @@ public class VisionSourceManagerTest {
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;
@@ -571,7 +571,7 @@ public class VisionSourceManagerTest {
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(
@@ -609,7 +609,7 @@ public class VisionSourceManagerTest {
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 =