Skip to content

Commit

Permalink
Fixes in CAN and GUI front-end.
Browse files Browse the repository at this point in the history
  • Loading branch information
rombrew committed Jan 28, 2024
1 parent ff4bdff commit 1ea48b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion phobia/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ void config_default(struct config_phobia *fe)

strcpy(fe->fuzzy, "setpoint");

fe->regfile = 475;
fe->regfile = 480;
}

8 changes: 4 additions & 4 deletions phobia/phobia.c
Original file line number Diff line number Diff line change
Expand Up @@ -2716,7 +2716,7 @@ page_diagnose(struct public *pub)

if (link_grab_file_open(lp, pub->debug.file_snap) != 0) {

if (link_command(lp, "ap_log_flush") != 0) {
if (link_command(lp, "ap_log_flush" "\r\n") != 0) {

pub->debug.log_flush = 1;
}
Expand Down Expand Up @@ -4073,7 +4073,7 @@ page_lu_flux(struct public *pub)
link_command(lp, "pm_probe_noise_threshold");
}

if (nk_menu_item_label(ctx, "ZH threshold self-adjustment", NK_TEXT_LEFT)) {
if (nk_menu_item_label(ctx, "ZONE self-adjustment", NK_TEXT_LEFT)) {

link_command(lp, "reg pm.zone_threshold -1");
}
Expand Down Expand Up @@ -5039,8 +5039,8 @@ page_telemetry(struct public *pub)
nk_layout_row_dynamic(ctx, 0, 1);
nk_spacer(ctx);

reg_float(pub, "tlm.grabfreq", "Grab into RAM frequency");
reg_float(pub, "tlm.livefreq", "Live frequency");
reg_float(pub, "tlm.rate_grab", "Grab into RAM frequency");
reg_float(pub, "tlm.rate_live", "Live frequency");

nk_layout_row_dynamic(ctx, 0, 1);
nk_spacer(ctx);
Expand Down
8 changes: 4 additions & 4 deletions src/hal/can.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ void CAN_startup()
}

static int
CAN_wait_for_MSR(uint32_t xBITS, uint32_t xVAL)
CAN_wait_for_MSR(uint32_t xBITS, uint32_t xSET)
{
uint32_t xMSR;
int wait_N = 0;

do {
xMSR = CAN1->MSR & xBITS;

if (xMSR == xVAL) {
if (xMSR == xSET) {

return HAL_OK;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ void CAN_configure()
* */
CAN1->MCR |= CAN_MCR_INRQ;

if (CAN_wait_for_MSR(CAN_MSR_INAK, CAN_MSR_INAK) == 0) {
if (CAN_wait_for_MSR(CAN_MSR_INAK, CAN_MSR_INAK) != HAL_OK) {

log_TRACE("CAN to INIT failed" EOL);
}
Expand All @@ -135,7 +135,7 @@ void CAN_configure()
* */
CAN1->MCR &= ~CAN_MCR_INRQ;

if (CAN_wait_for_MSR(CAN_MSR_INAK, CAN_MSR_INAK) == 0) {
if (CAN_wait_for_MSR(CAN_MSR_INAK, CAN_MSR_INAK) != HAL_OK) {

log_TRACE("CAN to NORMAL failed" EOL);
}
Expand Down

0 comments on commit 1ea48b2

Please sign in to comment.