Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Ich glaube, Ihr habt in der getMonoflop Methode vergessen, dem Rückgabewert (Monoflop) das Relay anzugeben:

 

Hier Euer code:

public Monoflop getMonoflop(short relay) throws TimeoutException, NotConnectedException {
	ByteBuffer bb = ipcon.createRequestPacket((byte)9, FUNCTION_GET_MONOFLOP, this);
	bb.put((byte)relay);

	byte[] response = sendRequest(bb.array());

	bb = ByteBuffer.wrap(response, 8, response.length - ;
	bb.order(ByteOrder.LITTLE_ENDIAN);

	Monoflop obj = new Monoflop();
	obj.state = (bb.get()) != 0;
	obj.time = IPConnection.unsignedInt(bb.getInt());
	obj.timeRemaining = IPConnection.unsignedInt(bb.getInt());

	return obj;
}

Heissen sollte er aber:

public Monoflop getMonoflop(short relay) throws TimeoutException, NotConnectedException {
	ByteBuffer bb = ipcon.createRequestPacket((byte)9, FUNCTION_GET_MONOFLOP, this);
	bb.put((byte)relay);

	byte[] response = sendRequest(bb.array());

	bb = ByteBuffer.wrap(response, 8, response.length - ;
	bb.order(ByteOrder.LITTLE_ENDIAN);

	Monoflop obj = new Monoflop();
	obj.relay = relay;
	obj.state = (bb.get()) != 0;
	obj.time = IPConnection.unsignedInt(bb.getInt());
	obj.timeRemaining = IPConnection.unsignedInt(bb.getInt());

	return obj;
}

Wäre es möglich, dass Ihr das Relay auch noch dort einfüllt... sonst ist das immer 0 und im weiteren Verlauf eines Programs verliert sich die Information... welches Monoflop da gemeint war.

Geschrieben

Du hast recht, da ist ein Bug in den Java Bindings dies bezüglich. Aber der Bug ist, dass die Monoflop Klasse überhaupt das relay Member hat.

 

Dieser Bug ist in den Heute veröffentlichen Java Bindings behoben.

Geschrieben
  • Autor

Misst... nun muss ich mir merken, zu welchem Relay denn diese Monoflop-Parameter gehören...

 

Naja, ist eure Design-Entscheidung... muss ich akzeptieren.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.