mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
manager: make sure we don't reset the modem twice in a row
This patch adds a 3s delay when resetting the modem during which we avoid triggering a new reset. This makes sure we don't trigger a reset twice in a row. It also disables any related running timer to avoid being re-triggered unnecessarily.
This commit is contained in:
@@ -26,6 +26,11 @@ enum EG25State {
|
||||
|
||||
struct EG25Manager {
|
||||
GMainLoop *loop;
|
||||
guint reset_timer;
|
||||
|
||||
int at_fd;
|
||||
guint at_source;
|
||||
GList *at_cmds;
|
||||
|
||||
enum EG25State modem_state;
|
||||
gchar *modem_usb_id;
|
||||
@@ -40,10 +45,6 @@ struct EG25Manager {
|
||||
guint suspend_source;
|
||||
|
||||
|
||||
int at_fd;
|
||||
guint at_source;
|
||||
GList *at_cmds;
|
||||
|
||||
struct gpiod_chip *gpiochip[2];
|
||||
struct gpiod_line *gpio_out[5];
|
||||
struct gpiod_line *gpio_in[2];
|
||||
|
Reference in New Issue
Block a user