Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined PIN definition #342

Merged
merged 4 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/mcumap_gen.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions uCNC/cnc_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@ extern "C"
*
* */
#ifndef PWM_PINS_OFFSET
#define PWM_PINS_OFFSET 24
#define PWM_PINS_OFFSET 25
#endif
#ifndef SERVO_PINS_OFFSET
#define SERVO_PINS_OFFSET 40
#define SERVO_PINS_OFFSET 41
#endif
#ifndef DOUT_PINS_OFFSET
#define DOUT_PINS_OFFSET 46
#define DOUT_PINS_OFFSET 47
#endif
#ifndef ANALOG_PINS_OFFSET
#define ANALOG_PINS_OFFSET 114
Expand Down
14 changes: 7 additions & 7 deletions uCNC/src/cnc.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ MCU_CALLBACK void mcu_rtc_cb(uint32_t millis)
mcu_controls_changed_cb();
}
#endif
#if !(ACTIVITY_LED < 0)
#if ASSERT_PIN(ACTIVITY_LED)
// this blinks aprox. once every 1024ms
if (!(millis & (0x200 - 1)))
{
Expand Down Expand Up @@ -396,19 +396,19 @@ void cnc_clear_exec_state(uint8_t statemask)
#ifndef DISABLE_ALL_CONTROLS
uint8_t controls = io_get_controls();

#if !(ESTOP < 0)
#if ASSERT_PIN(ESTOP)
if (CHECKFLAG(controls, ESTOP_MASK)) // can't clear the alarm flag if ESTOP is active
{
CLEARFLAG(statemask, EXEC_KILL);
}
#endif
#if !(SAFETY_DOOR < 0)
#if ASSERT_PIN(SAFETY_DOOR)
if (CHECKFLAG(controls, SAFETY_DOOR_MASK)) // can't clear the door flag if SAFETY_DOOR is active
{
CLEARFLAG(statemask, EXEC_DOOR | EXEC_HOLD);
}
#endif
#if !(FHOLD < 0)
#if ASSERT_PIN(FHOLD)
if (CHECKFLAG(controls, FHOLD_MASK)) // can't clear the hold flag if FHOLD is active
{
CLEARFLAG(statemask, EXEC_HOLD);
Expand Down Expand Up @@ -722,13 +722,13 @@ void cnc_check_fault_systems(void)
#ifdef CONTROLS_MASK
inputs = io_get_controls();
#endif
#if !(ESTOP < 0)
#if ASSERT_PIN(ESTOP)
if (CHECKFLAG(inputs, ESTOP_MASK)) // fault on emergency stop
{
protocol_send_feedback(MSG_FEEDBACK_12);
}
#endif
#if !(SAFETY_DOOR < 0)
#if ASSERT_PIN(SAFETY_DOOR)
if (CHECKFLAG(inputs, SAFETY_DOOR_MASK)) // fault on safety door
{
protocol_send_feedback(MSG_FEEDBACK_6);
Expand Down Expand Up @@ -765,7 +765,7 @@ bool cnc_check_interlocking(void)
// if kill leave
if (CHECKFLAG(cnc_state.exec_state, EXEC_KILL))
{
#if !(ESTOP < 0)
#if ASSERT_PIN(ESTOP)
// the emergency stop is pressed.
if (io_get_controls() & ESTOP_MASK)
{
Expand Down
Loading