@@ -147,34 +147,47 @@ void loop()
147147 chain_button_mode_t button_mode;
148148 chain_status = M5Chain.getJoystick16Adc (devices_list->devices [i].id , &xAdcValue, &yAdcValue);
149149 if (chain_status == CHAIN_OK) {
150- Serial.printf (" JOYSTICK ID[%d] xAdcValue:%d, yAdcValue:%d \r\n " , devices_list->devices [i].id , xAdcValue, yAdcValue);
150+ Serial.printf (" JOYSTICK ID[%d] xAdcValue:%d, yAdcValue:%d \r\n " , devices_list->devices [i].id ,
151+ xAdcValue, yAdcValue);
151152 } else {
152- Serial.printf (" JOYSTICK ID[%d] get 16 adc value failed, chain_status:%d \r\n " , devices_list->devices [i].id , chain_status);
153+ Serial.printf (" JOYSTICK ID[%d] get 16 adc value failed, chain_status:%d \r\n " ,
154+ devices_list->devices [i].id , chain_status);
153155 }
154156 chain_status = M5Chain.getJoystick8Adc (devices_list->devices [i].id , &xAdcValue8, &yAdcValue8);
155157 if (chain_status == CHAIN_OK) {
156- Serial.printf (" JOYSTICK ID[%d] xAdcValue8:%d, yAdcValue8:%d \r\n " , devices_list->devices [i].id , xAdcValue8, yAdcValue8);
158+ Serial.printf (" JOYSTICK ID[%d] xAdcValue8:%d, yAdcValue8:%d \r\n " , devices_list->devices [i].id ,
159+ xAdcValue8, yAdcValue8);
157160 } else {
158- Serial.printf (" JOYSTICK ID[%d] get 8 adc value failed, chain_status:%d \r\n " , devices_list->devices [i].id , chain_status);
161+ Serial.printf (" JOYSTICK ID[%d] get 8 adc value failed, chain_status:%d \r\n " ,
162+ devices_list->devices [i].id , chain_status);
159163 }
160164
161165 chain_status = M5Chain.getJoystickMappedRange (devices_list->devices [i].id , mapRange, JOYSTICK_MAP_SIZE);
162166 if (chain_status == CHAIN_OK) {
163- Serial.printf (" JOYSTICK ID[%d] mapRange:%d %d %d %d %d %d %d %d \r\n " , devices_list->devices [i].id , mapRange[0 ], mapRange[1 ], mapRange[2 ], mapRange[3 ], mapRange[4 ], mapRange[5 ], mapRange[6 ], mapRange[7 ]);
167+ Serial.printf (" JOYSTICK ID[%d] mapRange:%d %d %d %d %d %d %d %d \r\n " , devices_list->devices [i].id ,
168+ mapRange[0 ], mapRange[1 ], mapRange[2 ], mapRange[3 ], mapRange[4 ], mapRange[5 ],
169+ mapRange[6 ], mapRange[7 ]);
164170 } else {
165- Serial.printf (" JOYSTICK ID[%d] get 16 adc map range failed, chain_status:%d \r\n " , devices_list->devices [i].id , chain_status);
171+ Serial.printf (" JOYSTICK ID[%d] get 16 adc map range failed, chain_status:%d \r\n " ,
172+ devices_list->devices [i].id , chain_status);
166173 }
167- chain_status = M5Chain.getJoystickMappedInt16Value (devices_list->devices [i].id , &xMapAdcValue, &yMapAdcValue);
174+ chain_status =
175+ M5Chain.getJoystickMappedInt16Value (devices_list->devices [i].id , &xMapAdcValue, &yMapAdcValue);
168176 if (chain_status == CHAIN_OK) {
169- Serial.printf (" JOYSTICK ID[%d] xMapAdcValue:%d, yMapAdcValue:%d \r\n " , devices_list->devices [i].id , xMapAdcValue, yMapAdcValue);
177+ Serial.printf (" JOYSTICK ID[%d] xMapAdcValue:%d, yMapAdcValue:%d \r\n " , devices_list->devices [i].id ,
178+ xMapAdcValue, yMapAdcValue);
170179 } else {
171- Serial.printf (" JOYSTICK ID[%d] get 16 adc map value failed, chain_status:%d \r\n " , devices_list->devices [i].id , chain_status);
180+ Serial.printf (" JOYSTICK ID[%d] get 16 adc map value failed, chain_status:%d \r\n " ,
181+ devices_list->devices [i].id , chain_status);
172182 }
173- chain_status = M5Chain.getJoystickMappedInt8Value (devices_list->devices [i].id , &xMapAdcValue8, &yMapAdcValue8);
183+ chain_status =
184+ M5Chain.getJoystickMappedInt8Value (devices_list->devices [i].id , &xMapAdcValue8, &yMapAdcValue8);
174185 if (chain_status == CHAIN_OK) {
175- Serial.printf (" JOYSTICK ID[%d] xMapAdcValue8:%d, yMapAdcValue8:%d \r\n " , devices_list->devices [i].id , xMapAdcValue8, yMapAdcValue8);
186+ Serial.printf (" JOYSTICK ID[%d] xMapAdcValue8:%d, yMapAdcValue8:%d \r\n " ,
187+ devices_list->devices [i].id , xMapAdcValue8, yMapAdcValue8);
176188 } else {
177- Serial.printf (" JOYSTICK ID[%d] get 8 adc map value failed, chain_status:%d \r\n " , devices_list->devices [i].id , chain_status);
189+ Serial.printf (" JOYSTICK ID[%d] get 8 adc map value failed, chain_status:%d \r\n " ,
190+ devices_list->devices [i].id , chain_status);
178191 }
179192
180193 chain_status = M5Chain.getJoystickButtonStatus (devices_list->devices [i].id , &button_status);
0 commit comments