Skip to content

Commit 0feeab9

Browse files
Merge pull request #5 from team3042/line-following-additions
Adding Functions Used in Line Following
2 parents b05989a + 66ecb50 commit 0feeab9

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/main/java/io/github/pseudoresonance/pixy2api/Pixy2.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,20 @@ public String getFirmwareTypeString() {
311311
}
312312
}
313313

314+
/**
315+
* Get width of the pixy's visual frame after it is calcualted during init
316+
*/
317+
public int getFrameWidth() {
318+
return frameWidth;
319+
}
320+
321+
/**
322+
* Get height of the pixy's visual frame after it is calcualted during inits
323+
*/
324+
public int getFrameHeight() {
325+
return frameHeight;
326+
}
327+
314328
/**
315329
* Synchronizes communication with Pixy2
316330
*

src/main/java/io/github/pseudoresonance/pixy2api/Pixy2Line.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ public byte getAllFeatures() {
8787
return getFeatures(LINE_GET_ALL_FEATURES, LINE_ALL_FEATURES, true);
8888
}
8989

90+
/**
91+
* Gets the main features from the Pixy2. This is a more constrained line tracking algorithm.
92+
*
93+
* @return Pixy2 error code
94+
*/
95+
public byte getMainFeatures()
96+
{
97+
return getFeatures(LINE_GET_MAIN_FEATURES, LINE_ALL_FEATURES, true);
98+
}
99+
90100
/**
91101
* Gets specified features from Pixy2
92102
*

0 commit comments

Comments
 (0)