-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Procedure
[1] Clone https://github.com/CrossTheRoadElec/Phoenix-Linux-SocketCAN-Example
[2] Install Hero Light to a USB attached HERO to provide CAN to Raspberry PI.
[3] Deploy test example to Raspberry PI.
Example...
#include "ctre/Phoenix.h"
#include <string>
#include <iostream>
#include <chrono>
#include <thread>
#include "Platform-linux-socket-can.h"
using namespace ctre::phoenix;
using namespace ctre::phoenix::platform;
using namespace ctre::phoenix::motorcontrol;
using namespace ctre::phoenix::motorcontrol::can;
int main() {
std::cout << "Please input the name of your can interface: ";
std::string interface;
std::cin >> interface;
ctre::phoenix::platform::can::SetCANInterface(interface.c_str());
TalonSRX * talon = new TalonSRX(0);
while (1) {
ctre::phoenix::platform::FeedWatchDog(100);
talon->Set(ControlMode::PercentOutput, 0.1);
std::this_thread::sleep_for(std::chrono::milliseconds(20));
}
return 0;
}
[4] Run program, after several seconds Talon disables [NOT OK, expect to stay enabled]
[5] Confirm missing messages on the bus. [NOT OK, frames should be there].
[6] Retest using Ubuntu Linux Desktop
[7] Confirm issues does not reproduce [OK, expected]
[8] Retest RPi using a CANNable.
[9] Confirm issues does not reproduce [OK, expected]
Most likely has to do with this...
#6
Thanks to RHilton for reporting this.
Metadata
Metadata
Assignees
Labels
No labels