@@ -86,7 +86,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
8686 labelBackgroundColor: Colors .yellow,
8787 backgroundColor: Colors .yellow,
8888 onTap: () {
89- SerialPortUtils ().sendString ( 'R' );
89+ SerialPortUtils ().readData ( );
9090 },
9191 ),
9292 SpeedDialChild (
@@ -96,8 +96,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
9696 labelBackgroundColor: Colors .green,
9797 backgroundColor: Colors .green,
9898 onTap: () {
99- SerialPortUtils ().sendString (
100- SettingsRepository ().generateSaveSettings ());
99+ SerialPortUtils ().saveSettings ();
101100 },
102101 ),
103102 SpeedDialChild (
@@ -107,7 +106,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
107106 labelBackgroundColor: Colors .blue,
108107 backgroundColor: Colors .blue,
109108 onTap: () {
110- SerialPortUtils ().sendString ( 'W' );
109+ SerialPortUtils ().resetSettings ( );
111110 }),
112111 SpeedDialChild (
113112 child: const Icon (Icons .exit_to_app),
@@ -116,7 +115,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
116115 labelBackgroundColor: Colors .red,
117116 backgroundColor: Colors .red,
118117 onTap: () {
119- SerialPortUtils ().closeConnection ();
118+ SerialPortUtils ().disconnect ();
120119 Navigator .pop (context);
121120 }),
122121 ],
0 commit comments