Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial FatFileSystemCpp mbed
Diff: VIPSSerialProtocol.cpp
- Revision:
- 46:432d63e8fe64
- Parent:
- 36:fff2a71bbf86
- Child:
- 49:df05784d9a5c
--- a/VIPSSerialProtocol.cpp Thu Aug 12 15:51:43 2021 +0000
+++ b/VIPSSerialProtocol.cpp Tue Aug 17 15:55:40 2021 +0000
@@ -340,13 +340,18 @@
offset+=4;
}
- /*if ( ( ( lastPositions[nextPosition].pos.KFStatus & 0xE634) == 0x0400) && (!hyperSmoothEnabled)) {
- EnableSmoothing(true);
- pc.write("Auto HS On\r\n", 12);
- } else if (hyperSmoothEnabled) {
- EnableSmoothing(false);
- pc.write("Auto HS Off\r\n", 13);
- }*/ //Auto Hypersmooth, test in later commit after Ethernet Thread tested
+ if (UserSettings.AutoHyperSmooth) {
+ int testValue = (lastPositions[nextPosition].pos.KFStatus & 0xE634);
+
+ if ( ( ( testValue & 0x400) == 0x400) && (!hyperSmoothEnabled)) {
+ EnableSmoothing(true);
+ pc.write("Auto HS On\r\n", 12);
+ } else if ( ( ( testValue & 0x400) != 0x400) && (hyperSmoothEnabled)) {
+ EnableSmoothing(false);
+ pc.write("Auto HS Off\r\n", 13);
+ } //Auto Hypersmooth
+ }
+
smoothOutputPacket(&(lastPositions[nextPosition].pos));
@@ -420,7 +425,7 @@
YSmoothTotal = posPtr->Y * (SmoothBy - 1);
ZSmoothTotal = posPtr->Height * (SmoothBy - 1);
SmoothRunning = true;
- pc.write("Seeded Filter\r\n",11);
+ //pc.write("Seeded Filter\r\n",11);
}
//smooth the KF_X and KF_Y positions
XSmoothTotal += posPtr->X;
@@ -436,7 +441,7 @@
ZSmoothTotal -= posPtr->Height;
} else {
SmoothRunning = false;
- // pc.printf("filterX = %f\r\n",xFilter.lastValue());
+// pc.printf("filterX = %f\r\n",xFilter.lastValue());
posPtr->X = xFilter.lastValue();
posPtr->Y = yFilter.lastValue();
posPtr->Height = zFilter.lastValue();