Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Aug 27, 2024
1 parent dbeab8b commit 9174f69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 10 additions & 1 deletion developerRobot/src/main/native/cpp/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
// the WPILib BSD license file in the root directory of this project.

#include <frc/TimedRobot.h>
#include <hal/simulation/SimDataValue.h>
#include <fmt/base.h>

static double Dev_GetDefault();
class Robot : public frc::TimedRobot {
static const char* GetValName() {
return "Name";
}
public:
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
Robot() {}
Robot() {
hal::SimDataValue<double, HAL_MakeDouble, GetValName, Dev_GetDefault> val;
fmt::println("{}",val.Get());
}

/**
* This function is run once each time the robot enters autonomous mode
Expand Down
3 changes: 3 additions & 0 deletions developerRobot/src/main/native/cpp/default.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
double Dev_GetDefault() {
return 1.5;
}

0 comments on commit 9174f69

Please sign in to comment.