Browse Source

AP_Logger: revert adding PSCP log structure

c415-sdk
Randy Mackay 4 years ago
parent
commit
36dee8791a
  1. 1
      libraries/AP_Logger/AP_Logger.h
  2. 17
      libraries/AP_Logger/LogFile.cpp
  3. 30
      libraries/AP_Logger/LogStructure.h

1
libraries/AP_Logger/AP_Logger.h

@ -290,7 +290,6 @@ public: @@ -290,7 +290,6 @@ public:
void Write_SimpleAvoidance(uint8_t state, const Vector2f& desired_vel, const Vector2f& modified_vel, bool back_up);
void Write_Winch(bool healthy, bool thread_end, bool moving, bool clutch, uint8_t mode, float desired_length, float length, float desired_rate, uint16_t tension, float voltage, int8_t temp);
void Write_PSC(const Vector3f &pos_target, const Vector3f &position, const Vector3f &vel_target, const Vector3f &velocity, const Vector3f &accel_target, const float &accel_x, const float &accel_y);
void Write_PSCP(const Vector3f &vel_error, const Vector2f &vel_xy_p, const Vector2f &vel_xy_i, const Vector2f &vel_xy_d);
void Write(const char *name, const char *labels, const char *fmt, ...);
void Write(const char *name, const char *labels, const char *units, const char *mults, const char *fmt, ...);

17
libraries/AP_Logger/LogFile.cpp

@ -1155,20 +1155,3 @@ void AP_Logger::Write_PSC(const Vector3f &pos_target, const Vector3f &position, @@ -1155,20 +1155,3 @@ void AP_Logger::Write_PSC(const Vector3f &pos_target, const Vector3f &position,
};
WriteBlock(&pkt, sizeof(pkt));
}
void AP_Logger::Write_PSCP(const Vector3f &vel_error, const Vector2f &vel_xy_p, const Vector2f &vel_xy_i, const Vector2f &vel_xy_d)
{
struct log_PSCP pkt{
LOG_PACKET_HEADER_INIT(LOG_PSCP_MSG),
time_us : AP_HAL::micros64(),
vel_error_x : vel_error.x * 0.01f,
vel_xy_p_x : vel_xy_p.x,
vel_xy_i_x : vel_xy_i.x,
vel_xy_d_x : vel_xy_d.x,
vel_error_y : vel_error.y * 0.01f,
vel_xy_p_y : vel_xy_p.y,
vel_xy_i_y : vel_xy_i.y,
vel_xy_d_y : vel_xy_d.y
};
WriteBlock(&pkt, sizeof(pkt));
}

30
libraries/AP_Logger/LogStructure.h

@ -1288,19 +1288,6 @@ struct PACKED log_PSC { @@ -1288,19 +1288,6 @@ struct PACKED log_PSC {
float accel_y;
};
struct PACKED log_PSCP {
LOG_PACKET_HEADER;
uint64_t time_us;
float vel_error_x;
float vel_xy_p_x;
float vel_xy_i_x;
float vel_xy_d_x;
float vel_error_y;
float vel_xy_p_y;
float vel_xy_i_y;
float vel_xy_d_y;
};
// FMT messages define all message formats other than FMT
// UNIT messages define units which can be referenced by FMTU messages
// FMTU messages associate types (e.g. centimeters/second/second) to FMT message fields
@ -2497,18 +2484,6 @@ struct PACKED log_PSCP { @@ -2497,18 +2484,6 @@ struct PACKED log_PSCP {
// @Field: AX: Acceleration, X-axis
// @Field: AY: Acceleration, Y-axis
// @LoggerMessage: PSCP
// @Description: Position Control velocity PID gains
// @Field: TimeUS: Time since system startup
// @Field: EX: Velocity error, X-axis
// @Field: kPX: Velocity P gain, X-axis
// @Field: kIX: Velocity I gain, X-axis
// @Field: kDX: Velocity D gain, X-axis
// @Field: EY: Velocity error, Y-axis
// @Field: kPY: Velocity P gain, Y-axis
// @Field: kIY: Velocity I gain, Y-axis
// @Field: kDY: Velocity D gain, Y-axis
// messages for all boards
#define LOG_BASE_STRUCTURES \
{ LOG_FORMAT_MSG, sizeof(log_Format), \
@ -2728,9 +2703,7 @@ struct PACKED log_PSCP { @@ -2728,9 +2703,7 @@ struct PACKED log_PSCP {
{ LOG_WINCH_MSG, sizeof(log_Winch), \
"WINC", "QBBBBBfffHfb", "TimeUS,Heal,ThEnd,Mov,Clut,Mode,DLen,Len,DRate,Tens,Vcc,Temp", "s-----mmn?vO", "F-----000000" }, \
{ LOG_PSC_MSG, sizeof(log_PSC), \
"PSC", "Qffffffffffff", "TimeUS,TPX,TPY,PX,PY,TVX,TVY,VX,VY,TAX,TAY,AX,AY", "smmmmnnnnoooo", "F000000000000" }, \
{ LOG_PSCP_MSG, sizeof(log_PSCP), \
"PSCP", "Qffffffff", "TimeUS,EX,kPX,kIX,kDX,EY,kPY,kIY,kDY", "sn---n---", "F00000000"}
"PSC", "Qffffffffffff", "TimeUS,TPX,TPY,PX,PY,TVX,TVY,VX,VY,TAX,TAY,AX,AY", "smmmmnnnnoooo", "F000000000000" }
// @LoggerMessage: SBPH
// @Description: Swift Health Data
@ -2893,7 +2866,6 @@ enum LogMessages : uint8_t { @@ -2893,7 +2866,6 @@ enum LogMessages : uint8_t {
LOG_SIMPLE_AVOID_MSG,
LOG_WINCH_MSG,
LOG_PSC_MSG,
LOG_PSCP_MSG,
_LOG_LAST_MSG_
};

Loading…
Cancel
Save