Compare commits

..

No commits in common. "9714d659ea8259c55abaed4989d9cfe0126bfd85" and "f58247e0292de2783a05878fb70c76ece15a4e0d" have entirely different histories.

3 changed files with 9 additions and 7 deletions

View File

@ -65,7 +65,7 @@ namespace ratgdo {
observable<uint32_t> closing_delay { 0 };
observable<int16_t> target_distance_measurement { -1 };
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
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
observable<int16_t> last_distance_measurement { 0 };
observable<uint16_t> openings { 0 }; // number of times the door has been opened

View File

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

View File

@ -271,7 +271,7 @@
<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>
<ul>
<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>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>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>
<p>Watch the v2.5i driver and firmware installation [<a href="https://www.youtube.com/watch?v=9WecAUTC9iI">video on YouTube</a>].</p>