2019-09-23 00:24:10 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2020-02-01 21:30:23 -08:00
|
|
|
/* Copyright (c) 2019-2020 FIRST. All Rights Reserved. */
|
2019-09-23 00:24:10 -07:00
|
|
|
/* 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. */
|
|
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#include <hal/Main.h>
|
|
|
|
|
#include <wpi/raw_ostream.h>
|
|
|
|
|
|
|
|
|
|
#include "AccelerometerGui.h"
|
2019-11-17 16:35:45 -08:00
|
|
|
#include "AddressableLEDGui.h"
|
2019-09-23 00:24:10 -07:00
|
|
|
#include "AnalogGyroGui.h"
|
|
|
|
|
#include "AnalogInputGui.h"
|
|
|
|
|
#include "AnalogOutGui.h"
|
|
|
|
|
#include "CompressorGui.h"
|
|
|
|
|
#include "DIOGui.h"
|
|
|
|
|
#include "DriverStationGui.h"
|
|
|
|
|
#include "EncoderGui.h"
|
2020-02-01 21:30:23 -08:00
|
|
|
#include "Field2D.h"
|
2019-09-23 00:24:10 -07:00
|
|
|
#include "HALSimGui.h"
|
2020-04-05 23:09:50 -07:00
|
|
|
#include "NetworkTablesGui.h"
|
2019-09-23 00:24:10 -07:00
|
|
|
#include "PDPGui.h"
|
|
|
|
|
#include "PWMGui.h"
|
|
|
|
|
#include "RelayGui.h"
|
|
|
|
|
#include "RoboRioGui.h"
|
|
|
|
|
#include "SimDeviceGui.h"
|
|
|
|
|
#include "SolenoidGui.h"
|
2019-11-10 20:55:42 -08:00
|
|
|
#include "TimingGui.h"
|
2019-09-23 00:24:10 -07:00
|
|
|
|
|
|
|
|
using namespace halsimgui;
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
#if defined(WIN32) || defined(_WIN32)
|
|
|
|
|
__declspec(dllexport)
|
|
|
|
|
#endif
|
|
|
|
|
int HALSIM_InitExtension(void) {
|
|
|
|
|
HALSimGui::Add(AccelerometerGui::Initialize);
|
2019-11-17 16:35:45 -08:00
|
|
|
HALSimGui::Add(AddressableLEDGui::Initialize);
|
2019-09-23 00:24:10 -07:00
|
|
|
HALSimGui::Add(AnalogGyroGui::Initialize);
|
|
|
|
|
HALSimGui::Add(AnalogInputGui::Initialize);
|
|
|
|
|
HALSimGui::Add(AnalogOutGui::Initialize);
|
|
|
|
|
HALSimGui::Add(CompressorGui::Initialize);
|
|
|
|
|
HALSimGui::Add(DriverStationGui::Initialize);
|
|
|
|
|
HALSimGui::Add(DIOGui::Initialize);
|
|
|
|
|
HALSimGui::Add(EncoderGui::Initialize);
|
2020-02-01 21:30:23 -08:00
|
|
|
HALSimGui::Add(Field2D::Initialize);
|
2020-04-05 23:09:50 -07:00
|
|
|
HALSimGui::Add(NetworkTablesGui::Initialize);
|
2019-09-23 00:24:10 -07:00
|
|
|
HALSimGui::Add(PDPGui::Initialize);
|
|
|
|
|
HALSimGui::Add(PWMGui::Initialize);
|
|
|
|
|
HALSimGui::Add(RelayGui::Initialize);
|
|
|
|
|
HALSimGui::Add(RoboRioGui::Initialize);
|
|
|
|
|
HALSimGui::Add(SimDeviceGui::Initialize);
|
|
|
|
|
HALSimGui::Add(SolenoidGui::Initialize);
|
2019-11-10 20:55:42 -08:00
|
|
|
HALSimGui::Add(TimingGui::Initialize);
|
2019-09-23 00:24:10 -07:00
|
|
|
|
|
|
|
|
wpi::outs() << "Simulator GUI Initializing.\n";
|
|
|
|
|
if (!HALSimGui::Initialize()) return 0;
|
|
|
|
|
HAL_SetMain(nullptr, HALSimGui::Main, HALSimGui::Exit);
|
|
|
|
|
wpi::outs() << "Simulator GUI Initialized!\n";
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
} // extern "C"
|