halsim_ds_socket: Update tag parsing, and add rumble support (#1214)

Outputs are now sent. Ensure only the proper number of outputs are actually sent though.

Also adds match time, and proper enable tags.
This commit is contained in:
Thad House
2018-07-26 01:30:29 -07:00
committed by Peter Johnson
parent d54c2665dc
commit 63c1f80d60
14 changed files with 542 additions and 343 deletions

View File

@@ -61,6 +61,7 @@ HAL_ENUM(HAL_MatchType) {
*/
#define HAL_kMaxJoystickAxes 12
#define HAL_kMaxJoystickPOVs 12
#define HAL_kMaxJoysticks 6
struct HAL_JoystickAxes {
int16_t count;

View File

@@ -9,9 +9,12 @@
#ifndef __FRC_ROBORIO__
#include "hal/Types.h"
extern "C" {
void HALSIM_WaitForProgramStart(void);
void HALSIM_SetProgramStarted(void);
HAL_Bool HALSIM_GetProgramStarted(void);
void HALSIM_RestartTiming(void);
} // extern "C"

View File

@@ -15,6 +15,7 @@ namespace frc {
namespace sim {
void WaitForProgramStart() { HALSIM_WaitForProgramStart(); }
void SetProgramStarted() { HALSIM_SetProgramStarted(); }
bool GetProgramStarted() { return HALSIM_GetProgramStarted(); }
void RestartTiming() { HALSIM_RestartTiming(); }
} // namespace sim
} // namespace frc

View File

@@ -36,6 +36,7 @@ int64_t GetFPGATime() {
double GetFPGATimestamp() { return GetFPGATime() * 1.0e-6; }
void SetProgramStarted() { programStarted = true; }
bool GetProgramStarted() { return programStarted; }
} // namespace hal
using namespace hal;
@@ -52,5 +53,7 @@ void HALSIM_WaitForProgramStart(void) {
void HALSIM_SetProgramStarted(void) { SetProgramStarted(); }
HAL_Bool HALSIM_GetProgramStarted(void) { return GetProgramStarted(); }
void HALSIM_RestartTiming(void) { RestartTiming(); }
} // extern "C"