Hello, I’m trying to get our robots limelight so that when the driver hits the trigger button the camera LED’s turn on. And are of every other time. I can’t find this on the limelight’s website and I have seen others use it. So wondering how it is done in C++.
The easiest way is to make your default pipeline with the LEDs off, and switch to a “targeting” pipeline when it is time to target.
It is pretty easy. We did it like this.
pLimelightTable = nt::NetworkTableInstance::GetDefault().GetTable(“limelight-rhs”);
pLimelightTable->PutNumber(“ledMode”, 1); // leds off
pLimelightTable->PutNumber(“ledMode”, 3); // leds on
You may also want to check out the camMode entry. We use that in addition to the ledMode to switch the camera between driver mode and vision mode when we turn the leds on. We can use the limelight feed for driving as well as targeting.
I’d recommend being careful if you try doing this by switching pipelines. We found switching pipelines took a bit longer than we liked.
I would recommend against using the camMode functionality, as the Limelight team plans to deprecate that functionality eventually. We use separate pipelines to get around this, one for targeting, one for normal camera usage.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.