Branch cleaning
This commit is contained in:
parent
749d79d51e
commit
73e1328d70
4 changed files with 2 additions and 57 deletions
|
@ -15,7 +15,6 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compile 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
|
||||
compile "org.springframework.boot:spring-boot-starter-websocket"
|
||||
implementation 'org.springframework.boot:spring-boot-starter'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-security'
|
||||
|
|
|
@ -33,11 +33,7 @@ public class KnobDimmer extends Dimmer {
|
|||
dl.setIntensity((dl.getIntensity() + 5) % 105);
|
||||
} else {
|
||||
dl.setIntensity(dl.getIntensity() + (5 - remainder));
|
||||
if (dl.getIntensity() == 0) {
|
||||
dl.setIntensity(100);
|
||||
} else {
|
||||
dl.setIntensity(dl.getIntensity() - 5);
|
||||
}
|
||||
dl.setIntensity((dl.getIntensity() - 5) % 105);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut.websocket;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.websocket.*;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
|
||||
@ServerEndpoint(
|
||||
value =
|
||||
"theEndpointMustHaveAShotNameBecauseAndreaBritesMartesMaronesIsAVeryNiceProgrammerThatMustTypeThisByHand.exe") // DONE: choose path
|
||||
public class HouseEndpoint {
|
||||
private Session session;
|
||||
|
||||
@OnOpen
|
||||
public void onOpen(Session session) throws IOException {}
|
||||
|
||||
@OnMessage
|
||||
public void onMessage() throws IOException {}
|
||||
|
||||
@OnClose
|
||||
public void onClose() {}
|
||||
|
||||
@OnError
|
||||
public void onError() {}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
package ch.usi.inf.sa4.sanmarinoes.smarthut.websocket;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
|
||||
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
||||
|
||||
@Configuration
|
||||
@EnableWebSocketMessageBroker
|
||||
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
|
||||
@Override
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
registry.addEndpoint("/house")
|
||||
.setAllowedOrigins("domainURL")
|
||||
.withSockJS(); // TODO: set domain URL
|
||||
}
|
||||
|
||||
/** Creates message brokers in-memory to send and receive messages for topic and queue route */
|
||||
@Override
|
||||
public void configureMessageBroker(MessageBrokerRegistry config) {
|
||||
config.enableSimpleBroker("/topic/", "/queue/");
|
||||
config.setApplicationDestinationPrefixes("/app");
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue