Compare commits
3 Commits
fdc5a065f9
...
52ed86323c
Author | SHA1 | Date |
---|---|---|
Paul Wieland | 52ed86323c | |
Paul Wieland | 9714d659ea | |
Paul Wieland | b2f6ec1379 |
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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 & 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>
|
||||||
|
|
Loading…
Reference in New Issue