ArduPilot / ArduPilot/pymavlink
storage_information message is giving me an error
- Dominant language
- Python
- Stars
- 728
- Forks
- 739
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 7
Description
i get the following output when trying to send a byte array object

function is as below
def mavlink_send_storage_information(self, the_connection):
#if self.mavlink10():
#
# This is a byte array of the string
#
b = bytearray(b'ABB')
#
# forced uint8 with numpy
#
b8_numpy = np.array(b, np.uint8)
try:
the_connection.mav.storage_information_send(
self.time_boot_ms,
self.storage_id,
self.storage_count,
self.status,
self.total_capacity,
self.used_capacity,
self.available_capacity,
self.read_speed,
self.write_speed,
1,
b8_numpy,
2)
ret = True
except Exception as err_msg:
print("\033[32m Failed to send storage information message : %s type is %s" % (err_msg,type(b8_numpy)))
ret = False
try:
the_connection.mav.storage_information_send(
self.time_boot_ms,
self.storage_id,
self.storage_count,
self.status,
self.total_capacity,
self.used_capacity,
self.available_capacity,
self.read_speed,
self.write_speed,
1,
b,
2)
ret = True
except Exception as err_msg:
print("\033[32m Failed to send storage information message : %s type is %s" % (err_msg, type(b)))
ret = False
l=0
for l in range(len(b)):
print(f"\033[33m bytes array value {l} is {b[l]} type {type(b[1])}")
try:
the_connection.mav.storage_information_send(
self.time_boot_ms,
self.storage_id,
self.storage_count,
self.status,
self.total_capacity,
self.used_capacity,
self.available_capacity,
self.read_speed,
self.write_speed)
ret = True
except Exception as err_msg:
print("\033[32m Failed to send storage information message : %s (default)" % (err_msg))
ret = False
return ret
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the mavlink_send_storage_information function in the issue and inspect how storage_information_send handles the bytearray and NumPy array arguments. Reproduce each of the three calls and capture the actual exception text rather than relying on the linked screenshot; done means identifying and documenting or fixing the failing argument handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100