Skip to content

Commit 51c4893

Browse files
committed
defined interface in header file (motors.h), 'implemented' interface (in motorcontrol.h)
1 parent 211d4b8 commit 51c4893

File tree

2 files changed

+28
-17
lines changed

2 files changed

+28
-17
lines changed

jetson_script/MotorControl.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#ifndef MOTORCONTROL_H
2+
#define MOTORCONTROL_H
3+
4+
#include "Motors.h"
5+
6+
/**************************GENERAL LIBRARIES**************************/
7+
/*******************TO BE UTILIZED FOR ALL MOTORS*******************/
8+
9+
#include <Arduino.h>
10+
#include <FlexCAN_T4.h> // CAN enabling tool
11+
#include "SoloCAN.hpp" // SOLO UNO motor controller's library
12+
#include <QNEthernet.h> // Teensy's ethernet library
13+
#include <map>
14+
15+
#include "urc.ph.h" // Protobuf header file for compiling code
16+
#include "Messages.hpp" // Protobuff decode functions (encodeResponse, decodeResponse)
17+
18+
#include "pb_encode.h" // Protobuf encode functions
19+
#include "pb_decode.h" // Protobuf decode functions
20+
21+
// UPDATE AS WE GO ALONG
22+
class MotorControl : public Motors {
23+
public:
24+
void execute() override;
25+
};
26+
27+
#endif

jetson_script/Motors.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
#include "Motors.h"
2-
3-
/**************************GENERAL LIBRARIES**************************/
4-
/*******************TO BE UTILIZED FOR ALL MOTORS*******************/
5-
6-
#include <Arduino.h>
7-
#include <FlexCAN_T4.h> // CAN enabling tool
8-
#include "SoloCAN.hpp" // SOLO UNO motor controller's library
9-
#include <QNEthernet.h> // Teensy's ethernet library
10-
#include <map>
11-
#include "urc.ph.h" // Protobuf header file for compiling code
12-
#include "Messages.hpp" // Protobuff decode functions (encodeResponse, decodeResponse)
13-
14-
#include "pb_encode.h" // Protobuf encode functions
15-
#include "pb_decode.h" // Protobuf decode functions
16-
17-
#endif
1+
#include "MotorControl.h"
182

193
// Data about each motor to be sent to SOLO
204
enum class CAN_Send_State {

0 commit comments

Comments
 (0)