mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
neoVI FIRE 2: MiscIO and EMiscIO Support
This commit is contained in:
@@ -249,6 +249,19 @@ int main() {
|
||||
ret = device->transmit(ethTxMessage); // This will return false if the device does not support OP (BR) Ethernet 2
|
||||
std::cout << (ret ? "OK" : "FAIL") << std::endl;
|
||||
|
||||
std::vector<icsneo::MiscIO> emisc = device->getEMiscIO();
|
||||
if(!emisc.empty()) {
|
||||
std::cout << "\tReading EMisc values..." << std::endl;
|
||||
for(const auto& io : emisc) {
|
||||
icsneo::optional<double> val = device->getAnalogIO(icsneo::IO::EMisc, io.number);
|
||||
std::cout << "\t\tEMISC" << io.number;
|
||||
if(val.has_value())
|
||||
std::cout << " - OK (" << val.value() << "V)" << std::endl;
|
||||
else
|
||||
std::cout << " - FAIL, it may need to be enabled in neoVI Explorer (" << icsneo::GetLastError() << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Go offline, stop sending and receiving traffic
|
||||
|
||||
Reference in New Issue
Block a user