Skip to content

Commit

Permalink
constParameterPointer
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Sep 22, 2024
1 parent fd6fe90 commit da75bfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion board/safety.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ bool max_limit_check(int val, const int MAX_VAL, const int MIN_VAL) {
}

// check that commanded torque value isn't too far from measured
bool dist_to_meas_check(int val, int val_last, struct sample_t *val_meas,
bool dist_to_meas_check(int val, int val_last, const struct sample_t *val_meas,
const int MAX_RATE_UP, const int MAX_RATE_DOWN, const int MAX_ERROR) {

// *** val rate limit check ***
Expand Down
4 changes: 2 additions & 2 deletions board/safety_declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const uint8_t MAX_MISSED_MSGS = 10U;


// sample struct that keeps 6 samples in memory
struct sample_t {
const struct sample_t {
int values[MAX_SAMPLE_VALS];
int min;
int max;
Expand Down Expand Up @@ -176,7 +176,7 @@ void reset_sample(struct sample_t *sample);
bool max_limit_check(int val, const int MAX, const int MIN);
bool angle_dist_to_meas_check(int val, struct sample_t *val_meas,
const int MAX_ERROR, const int MAX_VAL);
bool dist_to_meas_check(int val, int val_last, struct sample_t *val_meas,
bool dist_to_meas_check(int val, int val_last, const struct sample_t *val_meas,
const int MAX_RATE_UP, const int MAX_RATE_DOWN, const int MAX_ERROR);
bool driver_limit_check(int val, int val_last, const struct sample_t *val_driver,
const int MAX, const int MAX_RATE_UP, const int MAX_RATE_DOWN,
Expand Down

0 comments on commit da75bfa

Please sign in to comment.