Compare commits

...

2 Commits

Author SHA1 Message Date
Paul Wieland 9714d659ea update driver instructions 2024-12-18 16:19:18 -05:00
Paul Wieland b2f6ec1379 high ceiling & day light sensor adjustments
Ceilings that are higher than the sensor capabilities result in out of range (-1) readings.
Daylight, water on the floor and other environment changes can also cause the sensor to read out of range. This change results in 30 readings of -1 to be VehicleDetected false.
2024-12-06 14:40:34 -05:00
3 changed files with 7 additions and 9 deletions

View File

@ -65,7 +65,7 @@ namespace ratgdo {
observable<uint32_t> closing_delay { 0 }; observable<uint32_t> closing_delay { 0 };
observable<int16_t> target_distance_measurement { -1 }; observable<int16_t> target_distance_measurement { -1 };
std::vector<int16_t> distance_measurement { std::vector<int16_t>(10, -1) }; // the length of this vector determines how many in-range readings are required for presence detection to change states std::vector<int16_t> distance_measurement { std::vector<int16_t>(30, -1) }; // the length of this vector determines how many in-range readings are required for presence detection to change states
observable<int16_t> last_distance_measurement { 0 }; observable<int16_t> last_distance_measurement { 0 };
observable<uint16_t> openings { 0 }; // number of times the door has been opened observable<uint16_t> openings { 0 }; // number of times the door has been opened

View File

@ -88,15 +88,13 @@ namespace ratgdo {
objCount = pDistanceData->NumberOfObjectsFound; objCount = pDistanceData->NumberOfObjectsFound;
maxDistance = objCount == 0 ? -1 : pDistanceData->RangeData[objCount - 1].RangeMilliMeter; maxDistance = objCount == 0 ? -1 : pDistanceData->RangeData[objCount - 1].RangeMilliMeter;
/* if(maxDistance < 0) maxDistance = -1; /*
* if the sensor is pointed at glass, there are many error readings which will fill the * if the sensor is pointed at glass, there are many error -1 readings which will fill the
* vector with out of range data. The sensor should be sensitive enough to detect the floor * vector with out of range data. The sensor should be sensitive enough to detect the floor
* in most situations, unless its mounted really far away. * in most situations, but daylight and/or really high ceilings can cause long distance
* If this doesn't work, then the vector size will have to increase substantially * measurements to be out of range.
*/ */
if (maxDistance > 0) {
this->parent_->set_distance_measurement(maxDistance); this->parent_->set_distance_measurement(maxDistance);
}
// ESP_LOGD(TAG,"# obj found %d; distance %d",objCount, maxDistance); // ESP_LOGD(TAG,"# obj found %d; distance %d",objCount, maxDistance);

View File

@ -271,7 +271,7 @@
<h3>Drivers</h3> <h3>Drivers</h3>
<p>If you can't connect to your ratgdo board make sure you have the right driver installed for the type of board you have.</p> <p>If you can't connect to your ratgdo board make sure you have the right driver installed for the type of board you have.</p>
<ul> <ul>
<li>ratgdo32 disco uses a CH9102 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH343SER_EXE.html" target="_blank">driver download</a>]</li> <li>ratgdo32 and ratgdo32 disco use a CH9102 USB to Serial chipset. Modern versions of Windows &amp; macOS include the necessary drivers natively. Installing a standalone driver can create a conflict preventing you from connecting to ratgdo32.</li>
<li>ratgdo v2.5i uses a CH340 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH341SER_EXE.html" target="_blank">driver download</a>]</li> <li>ratgdo v2.5i uses a CH340 USB to Serial chipset. [<a href="https://www.wch-ic.com/downloads/CH341SER_EXE.html" target="_blank">driver download</a>]</li>
</ul> </ul>
<p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p> <p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p>