syslink_main: remove empty lines and struct keyword

This commit is contained in:
Matthias Grob 2020-08-25 19:44:35 +02:00
parent d82f325f8d
commit 180c6faf4a
2 changed files with 2 additions and 27 deletions

View File

@ -219,8 +219,6 @@ Syslink::update_params(bool force_set)
this->_params_update[2] = t;
this->_params_ack[2] = 0;
}
}
// 1M 8N1 serial connection to NRF51
@ -363,7 +361,7 @@ Syslink::task_main()
}
if (fds[1].revents & POLLIN) {
struct parameter_update_s update;
parameter_update_s update;
orb_copy(ORB_ID(parameter_update), _params_sub, &update);
update_params(false);
}
@ -372,7 +370,6 @@ Syslink::task_main()
}
close(_fd);
}
void
@ -497,7 +494,6 @@ Syslink::handle_message(syslink_message_t *msg)
} else if (_params_ack[2] == 0 && t - _params_update[2] > 10000) {
set_address(_addr);
}
}
void
@ -515,7 +511,6 @@ Syslink::handle_radio(syslink_message_t *sys)
} else if (sys->type == SYSLINK_RADIO_ADDRESS) {
_params_ack[2] = t;
}
}
void
@ -602,7 +597,6 @@ Syslink::handle_bootloader(syslink_message_t *sys)
c->data[22] = 0x10; // Protocol version
send_message(sys);
}
}
void
@ -797,7 +791,6 @@ void status()
}
printf("\n\n");
}
close(deckfd);
@ -827,20 +820,13 @@ void attached(int pid)
exit(found ? 1 : 0);
}
void test()
{
// TODO: Ensure battery messages are recent
// TODO: Read and write from memory to ensure it is working
}
}
} // namespace syslink
int syslink_main(int argc, char *argv[])
{
@ -849,7 +835,6 @@ int syslink_main(int argc, char *argv[])
exit(1);
}
const char *verb = argv[1];
if (!strcmp(verb, "start")) {
@ -873,9 +858,6 @@ int syslink_main(int argc, char *argv[])
syslink::test();
}
syslink::usage();
exit(1);

View File

@ -52,7 +52,6 @@ using namespace time_literals;
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
typedef enum {
BAT_DISCHARGING = 0,
BAT_CHARGING = 1,
@ -82,7 +81,6 @@ public:
int txrate;
private:
friend class SyslinkBridge;
friend class SyslinkMemory;
@ -153,7 +151,6 @@ private:
static int task_main_trampoline(int argc, char *argv[]);
void task_main();
};
@ -174,11 +171,9 @@ public:
void pipe_message(crtp_message_t *msg);
protected:
virtual pollevent_t poll_state(struct file *filp);
private:
Syslink *_link;
// Stores data that was received from syslink but not yet read by another driver
@ -186,7 +181,6 @@ private:
crtp_message_t _msg_to_send;
int _msg_to_send_size_remaining;
};
@ -219,5 +213,4 @@ private:
int write(int i, uint16_t addr, const char *buf, int length);
void sendAndWait();
};