Skip to content

Commit 4c2d187

Browse files
committed
Use NAN flag for no rotary axis
1 parent 7a4386b commit 4c2d187

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

display/i2c_interface.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include <stdio.h>
3131
#include <string.h>
32+
#include <math.h>
3233

3334
#include "i2c_interface.h"
3435

@@ -68,7 +69,7 @@ static machine_status_packet_t status_packet, prev_status = {0};
6869

6970
static void send_status_info (void *data)
7071
{
71-
uint_fast8_t idx = min(4, N_AXIS);
72+
uint_fast8_t idx = N_AXIS; //min(4, N_AXIS);
7273

7374
system_convert_array_steps_to_mpos(status_packet.coordinate.values, sys.position);
7475

@@ -97,7 +98,7 @@ static void send_status_info (void *data)
9798

9899
status_packet.feed_rate = st_get_realtime_rate();
99100

100-
if(msgtype || memcmp(&prev_status, &status_packet, offsetof(machine_status_packet_t, msgtype))) {
101+
if(true) {//msgtype || memcmp(&prev_status, &status_packet, offsetof(machine_status_packet_t, msgtype))) {
101102

102103
size_t len = ((status_packet.msgtype = msgtype)) ? offsetof(machine_status_packet_t, msg) : offsetof(machine_status_packet_t, msgtype);
103104

@@ -440,7 +441,7 @@ void display_init (void)
440441

441442
status_packet.address = 0;
442443
#if N_AXIS == 3
443-
status_packet.coordinate.a = 0xFFFFFFFF; // TODO: should be changed to NAN
444+
status_packet.coordinate.a = NAN; // TODO: should be changed to NAN
444445
#endif
445446

446447
// delay final setup until startup is complete

0 commit comments

Comments
 (0)