5 changed files with 40 additions and 8 deletions
-
5src/main/java/com/iflytop/handacid/app/command/control/SolutionAddStartCommand.java
-
4src/main/java/com/iflytop/handacid/app/core/listener/BleGamepadEventListener.java
-
6src/main/java/com/iflytop/handacid/app/core/state/DeviceState.java
-
27src/main/java/com/iflytop/handacid/app/core/state/RemoteControlState.java
-
6src/main/java/com/iflytop/handacid/app/service/DeviceInitService.java
@ -0,0 +1,27 @@ |
|||
package com.iflytop.handacid.app.core.state; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import io.swagger.v3.oas.annotations.media.Schema; |
|||
import lombok.Data; |
|||
import lombok.RequiredArgsConstructor; |
|||
import org.springframework.context.annotation.Scope; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Schema(description = "遥控器状态") |
|||
@Data |
|||
@Component |
|||
@Scope("prototype") |
|||
@RequiredArgsConstructor |
|||
@JsonIgnoreProperties(value = {"advisors", "frozen", "preFiltered", "proxyTargetClass", "targetSource", "exposeProxy", "advisorCount", "proxiedInterfaces", "targetClass"}) |
|||
public class RemoteControlState { |
|||
|
|||
@Schema(description = "遥控器是否连接") |
|||
private volatile boolean connected = false; |
|||
|
|||
@Schema(description = "当前电量(0-100%)") |
|||
private volatile int batteryLevel = 0; |
|||
|
|||
@Schema(description = "是否正在充电") |
|||
private volatile boolean charging = false; |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue