So i think i got the library working, but after compiling, this READLIDAR error pops up again…
Arduino: 1.8.18 (Windows 10), Board: "Waveshare RP2040 Zero, 2MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, IPv4 Only, Default (UF2)"
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2136,
from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink.h:32,
from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino:2:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h: In function 'uint16_t mavlink_msg_set_attitude_target_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_attitude_target_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:183:242: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
183 | return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);
| ~~~~~~~~~~~~~~~~~~~~~^
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:183:406: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
183 | return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h: In function 'uint16_t mavlink_msg_set_attitude_target_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_attitude_target_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:197:253: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
197 | return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);
| ~~~~~~~~~~~~~~~~~~~~~^
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:197:417: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
197 | return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2179:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h: In function 'uint16_t mavlink_msg_distance_sensor_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_distance_sensor_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h:200:387: warning: taking address of packed member of '__mavlink_distance_sensor_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
200 | return mavlink_msg_distance_sensor_pack(system_id, component_id, msg, distance_sensor->time_boot_ms, distance_sensor->min_distance, distance_sensor->max_distance, distance_sensor->current_distance, distance_sensor->type, distance_sensor->id, distance_sensor->orientation, distance_sensor->covariance, distance_sensor->horizontal_fov, distance_sensor->vertical_fov, distance_sensor->quaternion, distance_sensor->signal_quality);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h: In function 'uint16_t mavlink_msg_distance_sensor_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_distance_sensor_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h:214:398: warning: taking address of packed member of '__mavlink_distance_sensor_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
214 | return mavlink_msg_distance_sensor_pack_chan(system_id, component_id, chan, msg, distance_sensor->time_boot_ms, distance_sensor->min_distance, distance_sensor->max_distance, distance_sensor->current_distance, distance_sensor->type, distance_sensor->id, distance_sensor->orientation, distance_sensor->covariance, distance_sensor->horizontal_fov, distance_sensor->vertical_fov, distance_sensor->quaternion, distance_sensor->signal_quality);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2193:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h: In function 'uint16_t mavlink_msg_battery_status_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_battery_status_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:219:195: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
219 | return mavlink_msg_battery_status_pack(system_id, component_id, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);
| ~~~~~~~~~~~~~~~~^~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:219:418: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
219 | return mavlink_msg_battery_status_pack(system_id, component_id, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h: In function 'uint16_t mavlink_msg_battery_status_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_battery_status_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:233:206: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
233 | return mavlink_msg_battery_status_pack_chan(system_id, component_id, chan, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);
| ~~~~~~~~~~~~~~~~^~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:233:429: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
233 | return mavlink_msg_battery_status_pack_chan(system_id, component_id, chan, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2195:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h: In function 'uint16_t mavlink_msg_landing_target_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_landing_target_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h:218:349: warning: taking address of packed member of '__mavlink_landing_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
218 | return mavlink_msg_landing_target_pack(system_id, component_id, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y, landing_target->x, landing_target->y, landing_target->z, landing_target->q, landing_target->type, landing_target->position_valid);
| ~~~~~~~~~~~~~~~~^
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h: In function 'uint16_t mavlink_msg_landing_target_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_landing_target_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h:232:360: warning: taking address of packed member of '__mavlink_landing_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
232 | return mavlink_msg_landing_target_pack_chan(system_id, component_id, chan, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y, landing_target->x, landing_target->y, landing_target->z, landing_target->q, landing_target->type, landing_target->position_valid);
| ~~~~~~~~~~~~~~~~^
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2206:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h: In function 'uint16_t mavlink_msg_home_position_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_home_position_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h:191:218: warning: taking address of packed member of '__mavlink_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
191 | return mavlink_msg_home_position_pack(system_id, component_id, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z, home_position->time_usec);
| ~~~~~~~~~~~~~~~^
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h: In function 'uint16_t mavlink_msg_home_position_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_home_position_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h:205:229: warning: taking address of packed member of '__mavlink_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
205 | return mavlink_msg_home_position_pack_chan(system_id, component_id, chan, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z, home_position->time_usec);
| ~~~~~~~~~~~~~~~^
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2207:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h: In function 'uint16_t mavlink_msg_set_home_position_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_home_position_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h:200:284: warning: taking address of packed member of '__mavlink_set_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
200 | return mavlink_msg_set_home_position_pack(system_id, component_id, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z, set_home_position->time_usec);
| ~~~~~~~~~~~~~~~~~~~^
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h: In function 'uint16_t mavlink_msg_set_home_position_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_home_position_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h:214:295: warning: taking address of packed member of '__mavlink_set_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
214 | return mavlink_msg_set_home_position_pack_chan(system_id, component_id, chan, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z, set_home_position->time_usec);
| ~~~~~~~~~~~~~~~~~~~^
In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2257:
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h: In function 'uint16_t mavlink_msg_obstacle_distance_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_obstacle_distance_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h:173:158: warning: taking address of packed member of '__mavlink_obstacle_distance_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
173 | return mavlink_msg_obstacle_distance_pack(system_id, component_id, msg, obstacle_distance->time_usec, obstacle_distance->sensor_type, obstacle_distance->distances, obstacle_distance->increment, obstacle_distance->min_distance, obstacle_distance->max_distance, obstacle_distance->increment_f, obstacle_distance->angle_offset, obstacle_distance->frame);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h: In function 'uint16_t mavlink_msg_obstacle_distance_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_obstacle_distance_t*)':
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h:187:169: warning: taking address of packed member of '__mavlink_obstacle_distance_t' may result in an unaligned pointer value [-Waddress-of-packed-member]
187 | return mavlink_msg_obstacle_distance_pack_chan(system_id, component_id, chan, msg, obstacle_distance->time_usec, obstacle_distance->sensor_type, obstacle_distance->distances, obstacle_distance->increment, obstacle_distance->min_distance, obstacle_distance->max_distance, obstacle_distance->increment_f, obstacle_distance->angle_offset, obstacle_distance->frame);
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino: In function 'void loop()':
XV_Lidar_MAVLINK7_2040_dualcore:42:2: error: 'READLIDAR' was not declared in this scope
42 | READLIDAR();
| ^~~~~~~~~
C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino: In function 'void loop1()':
XV_Lidar_MAVLINK7_2040_dualcore:49:5: error: 'MAVLINK_IO' was not declared in this scope; did you mean 'MAVLINK_H'?
49 | MAVLINK_IO();
| ^~~~~~~~~~
| MAVLINK_H
XV_Lidar_MAVLINK7_2040_dualcore:50:5: error: 'MAVLINK_HB' was not declared in this scope; did you mean 'MAVLINK_H'?
50 | MAVLINK_HB();
| ^~~~~~~~~~
| MAVLINK_H
exit status 1
'READLIDAR' was not declared in this scope