mirror of https://github.com/schoebel/mars
main: tighten operations check
This commit is contained in:
parent
ffde5c0867
commit
e01d5ac272
|
@ -1715,9 +1715,17 @@ done:;
|
|||
static
|
||||
bool _is_trans_input_fully_working(struct trans_logger_input *trans_input)
|
||||
{
|
||||
struct mars_brick *prev_brick;
|
||||
|
||||
if (!trans_input ||
|
||||
!trans_input->connect)
|
||||
return false;
|
||||
|
||||
prev_brick = (void *)trans_input->connect->brick;
|
||||
if (!prev_brick ||
|
||||
!prev_brick->power.button ||
|
||||
!prev_brick->power.led_on)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue