Skip to content

Make error message appears only when error happen #138

@tame0001

Description

@tame0001

Currently, we are printing out status checking message every 10 seconds

self.dianostic = self.create_timer(10, self.dianostic)

def dianostic(self):
for odrv in self.odrvs:
odrv.check_errors()

This is not very helpful as it is hard to keep tracking critical messages. We should make this message shows up only when error happens.

I wrote this fucntion to check errors

def get_errors(self) -> str:
"""
Return ODrive system errors
"""
# https://docs.odriverobotics.com/v/0.5.4/fibre_types/com_odriverobotics_ODrive.html#ODrive.Error
errors = self.decode_errors(self.odrv.error)
return " & ".join([ODriveError(error).name for error in errors])

We can work on top of this fucntion

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions