Skip to content

Commit 969353f

Browse files
Update Robot.h
1 parent 5bbf5e1 commit 969353f

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

main/include/Robot.h

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#pragma once
99

10+
#include <cmath>
1011
#include <string>
1112
#include <iostream>
1213
#include <thread>
@@ -30,13 +31,16 @@
3031
#include <wpi/raw_ostream.h>
3132
#include <cameraserver/CameraServer.h>
3233

33-
using namepace std;
34+
using namespace std;
35+
using namespace frc;
36+
using namespace cv;
37+
using namespace cs;
3438

3539
class ImageProcess : public frc::TimedRobot {
36-
void makeGrid(cv::Mat img, int cellSize);
37-
cv::Mat makeGrid(char *fileName, char *result);
40+
void makeGrid(Mat img, int cellSize);
41+
Mat makeGrid(char *fileName, char *result);
3842
void RobotInit();
39-
std::string getPutTextData(int count);
43+
string getPutTextData(int count);
4044
};
4145

4246
class Robot : public frc::TimedRobot {
@@ -62,21 +66,22 @@ class Robot : public frc::TimedRobot {
6266
static constexpr double downSpeedFast = -.03;
6367
//Analog PI (PWM)
6468
//frc::AnalogInput input{0};
65-
frc::Joystick fightStick{1};
66-
frc::Joystick flightStick{2};
67-
frc::Compressor compressor;
68-
frc::PWMVictorSPX m_frontLeft{0};
69-
frc::PWMVictorSPX m_backLeft{1};
70-
frc::PWMVictorSPX m_frontRight{2};
71-
frc::PWMVictorSPX m_backRight{3};
72-
frc::PWMVictorSPX m_leftIntake{4};
73-
frc::PWMVictorSPX m_rightIntake{5};
74-
frc::PWMVictorSPX m_forklift{6};
75-
frc::SpeedControllerGroup m_left{m_frontLeft, m_backLeft};
76-
frc::SpeedControllerGroup m_right{m_frontRight, m_backRight};
77-
frc::DifferentialDrive Drive{m_left, m_right};
78-
frc::DoubleSolenoid s_panelLauncherBottom{0, 1};
79-
frc::DoubleSolenoid s_panelLauncherTop{2, 3};
80-
frc::DoubleSolenoid s_HABfront{4, 5};
81-
frc::DoubleSolenoid s_HABback{6, 7};
69+
Joystick fightStick{1};
70+
Joystick flightStick{2};
71+
Compressor compressor;
72+
Timer time;
73+
PWMVictorSPX m_frontLeft{0};
74+
PWMVictorSPX m_backLeft{1};
75+
PWMVictorSPX m_frontRight{2};
76+
PWMVictorSPX m_backRight{3};
77+
PWMVictorSPX m_leftIntake{4};
78+
PWMVictorSPX m_rightIntake{5};
79+
PWMVictorSPX m_forklift{6};
80+
SpeedControllerGroup m_left{m_frontLeft, m_backLeft};
81+
SpeedControllerGroup m_right{m_frontRight, m_backRight};
82+
DifferentialDrive Drive{m_left, m_right};
83+
DoubleSolenoid s_panelLauncherBottom{0, 1};
84+
DoubleSolenoid s_panelLauncherTop{2, 3};
85+
DoubleSolenoid s_HABfront{4, 5};
86+
DoubleSolenoid s_HABback{6, 7};
8287
};

0 commit comments

Comments
 (0)