Skip to content

Commit d5926f7

Browse files
committed
Clean up
1 parent 4820048 commit d5926f7

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

ipynao/nao_robot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""
1010

1111
from ipywidgets import DOMWidget
12-
from traitlets import Unicode, Bool, Integer
12+
from traitlets import Unicode, Integer
1313
from ._frontend import module_name, module_version
1414
from time import sleep
1515
import asyncio
@@ -62,9 +62,8 @@ class NaoRobotWidget(DOMWidget):
6262
value = Unicode('Hello World').tag(sync=True)
6363
connected = Unicode("Disconnected").tag(sync=True)
6464
status = Unicode("Not busy").tag(sync=True)
65-
synco = Unicode("test message").tag(sync=True)
6665
response = Unicode("").tag(sync=True)
67-
counter = Integer(0).tag(sync=True)
66+
counter = Integer(0).tag(sync=True, read_only=True)
6867
js_response = None
6968

7069
def __init__(self, **kwargs):

src/widget.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export class NaoRobotModel extends DOMWidgetModel {
2525
connected = 'Disconnected';
2626
status = 'Not busy';
2727
_services: serviceDict = {};
28-
synco: string;
2928

3029
defaults() {
3130
return {
@@ -37,7 +36,6 @@ export class NaoRobotModel extends DOMWidgetModel {
3736
_view_module: NaoRobotModel.view_module,
3837
_view_module_version: NaoRobotModel.view_module_version,
3938
value: 'Hello World',
40-
synco: 'something silly',
4139
connected: 'Disconnected',
4240
status: 'Not busy',
4341
response: '',
@@ -241,7 +239,6 @@ export class NaoRobotModel extends DOMWidgetModel {
241239
}
242240

243241
export class NaoRobotView extends DOMWidgetView {
244-
synco: HTMLDivElement;
245242
txt_connected: HTMLDivElement;
246243
txt_status: HTMLDivElement;
247244

@@ -258,23 +255,13 @@ export class NaoRobotView extends DOMWidgetView {
258255
this.txt_status.textContent = 'Not busy';
259256
this.el.appendChild(this.txt_status);
260257

261-
// Testing element
262-
this.synco = document.createElement('div');
263-
this.synco.textContent = 'it should be here';
264-
this.el.appendChild(this.synco);
265-
266258
this.value_changed();
267259
this.model.on('change:connected', this.value_changed, this);
268260
this.model.on('change:status', this.value_changed, this);
269-
this.model.on('change:synco', this.value_changed, this);
270261
}
271262

272263
value_changed() {
273-
// this.el.textContent = this.model.get('value');
274-
// this.synco = this.model.get('synco');
275-
console.log('THE VALUE CHANGED');
276264
this.txt_connected.textContent = this.model.get('connected');
277265
this.txt_status.textContent = this.model.get('status');
278-
this.synco.textContent = this.model.get('synco');
279266
}
280267
}

0 commit comments

Comments
 (0)