Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HERO Light (Candle light port): CAN Frames stop transmitting on RaspPi #7

Open
ozrien opened this issue Sep 7, 2018 · 0 comments
Open

Comments

@ozrien
Copy link
Member

ozrien commented Sep 7, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant