Skip to content
This repository was archived by the owner on Apr 22, 2019. It is now read-only.

Commit 926f951

Browse files
committed
logging improvements
1 parent c9657e3 commit 926f951

6 files changed

Lines changed: 15 additions & 2 deletions

File tree

pull-logs.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#! /bin/sh
2+
scp admin@10.50.24.2:/home/lvuser/FRC_UserProgram.log ./RIO-Logs/

src/main/cpp/Commands/Climb.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void Climb::Initialize() {
1313
this->armSpeed = 0.0;
1414
this->crawlSpeed = 0.0;
1515
this->legSpeed = 0.0;
16-
}
16+
}
1717

1818
// Called repeatedly when this Command is scheduled to run
1919
void Climb::Execute() {
@@ -28,6 +28,10 @@ void Climb::Execute() {
2828
this->legSpeed = this->pJoyOp->GetBumper(Hand::kRightHand)? -1 : 0;
2929
this->legSpeed = this->pJoyOp->GetBumper(Hand::kLeftHand) ? 1 : this->legSpeed;
3030

31+
if(this->legSpeed < 0.0){
32+
Utils::EdgeLight::Append(LedColour::kSOLID_GREEN);
33+
}
34+
3135
// Set motor outputs
3236
Robot::m_Arm->MoveArm(this->armSpeed);
3337
Robot::m_CrawlDrive->Move(this->crawlSpeed);

src/main/cpp/Commands/ClimbManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ void ClimbManager::Execute() {
2323

2424
// Signal all commands to kill themselves
2525
this->CurrentClimbState = this->ClimbState::kActive;
26+
Log("Climb mode active!");
2627

27-
// Start vibrating driver controller
28+
// Start vibrating driver controller
2829
this->pJoyOp->SetRumble(frc::GenericHID::RumbleType::kRightRumble, 0.5);
2930
}
3031

src/main/cpp/Robot.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <fstream>
88

99
#include "Utils/EdgeLight.h"
10+
// /home/lvuser/FRC_UserProgram.log
1011

1112
// Subsystems
1213
DriveTrain *Robot::m_DriveTrain;

src/main/include/Commands/Climb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <frc/commands/Command.h>
55

66
#include <Subsystems/CrawlDrive.h>
7+
#include <Utils/EdgeLight.h>
78
#include "RobotMap.h"
89
#include <frc/GenericHID.h>
910

src/main/include/RobotMap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Whenever possible, Macros and definitions are used in order to preserve memory
1212

13+
#include <iostream>
14+
1315
#define DODEBUG 0
1416

1517
// Camera mappings
@@ -86,4 +88,6 @@
8688
#define Header(x) std::cout << x
8789
#define EndHeader() std::cout << "DONE" << std::endl
8890

91+
#define Log(x) std::cout << x << std::endl;
92+
8993
#endif // _ROBOTMAP_HG_

0 commit comments

Comments
 (0)