mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Adds RobotController class (#828)
Unifies random functionality from other classes Deprecates all old functions.
This commit is contained in:
committed by
Peter Johnson
parent
88a6b4ac38
commit
8b7aa61091
47
wpilibc/src/main/native/include/RobotController.h
Normal file
47
wpilibc/src/main/native/include/RobotController.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace frc {
|
||||
|
||||
struct CANStatus {
|
||||
float percentBusUtilization;
|
||||
int busOffCount;
|
||||
int txFullCount;
|
||||
int receiveErrorCount;
|
||||
int transmitErrorCount;
|
||||
};
|
||||
|
||||
class RobotController {
|
||||
public:
|
||||
RobotController() = delete;
|
||||
static int GetFPGAVersion();
|
||||
static int64_t GetFPGARevision();
|
||||
static uint64_t GetFPGATime();
|
||||
static bool GetUserButton();
|
||||
static bool IsSysActive();
|
||||
static bool IsBrownedOut();
|
||||
static double GetInputVoltage();
|
||||
static double GetInputCurrent();
|
||||
static double GetVoltage3V3();
|
||||
static double GetCurrent3V3();
|
||||
static bool GetEnabled3V3();
|
||||
static int GetFaultCount3V3();
|
||||
static double GetVoltage5V();
|
||||
static double GetCurrent5V();
|
||||
static bool GetEnabled5V();
|
||||
static int GetFaultCount5V();
|
||||
static double GetVoltage6V();
|
||||
static double GetCurrent6V();
|
||||
static bool GetEnabled6V();
|
||||
static int GetFaultCount6V();
|
||||
static CANStatus GetCANStatus();
|
||||
};
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user