blob: 79d35e1e4e28a8b069e2a0fd9e48cd88da9134ef [file] [log] [blame]
Niko Sohmers3860f8a2024-01-12 21:05:19 -08001#include "y2024/control_loops/drivetrain/drivetrain_base.h"
2
3#include <chrono>
4
James Kuszmaul2549e752024-01-20 17:42:51 -08005#include "frc971/constants/constants_sender_lib.h"
Niko Sohmers3860f8a2024-01-12 21:05:19 -08006#include "frc971/control_loops/drivetrain/drivetrain_config.h"
James Kuszmaul2549e752024-01-20 17:42:51 -08007#include "y2024/constants/constants_generated.h"
Niko Sohmers3860f8a2024-01-12 21:05:19 -08008
Stephan Pleinesf63bde82024-01-13 15:59:33 -08009namespace y2024::control_loops::drivetrain {
Niko Sohmers3860f8a2024-01-12 21:05:19 -080010
James Kuszmaul2549e752024-01-20 17:42:51 -080011const frc971::control_loops::drivetrain::DrivetrainConfig<double>
12GetDrivetrainConfig(aos::EventLoop *event_loop) {
13 frc971::constants::ConstantsFetcher<Constants> constants_fetcher(event_loop);
14 return frc971::control_loops::drivetrain::DrivetrainConfig<double>::
15 FromFlatbuffer(
16 *CHECK_NOTNULL(constants_fetcher.constants().common()->drivetrain()));
Niko Sohmers3860f8a2024-01-12 21:05:19 -080017};
18
Stephan Pleinesf63bde82024-01-13 15:59:33 -080019} // namespace y2024::control_loops::drivetrain