File tree Expand file tree Collapse file tree 4 files changed +0
-36
lines changed Expand file tree Collapse file tree 4 files changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ class Camera(object):
49
49
# pylint: disable=too-many-public-methods
50
50
51
51
_instance = None
52
- _img_template = image .Image .load ("static/media/coderdojo-logo.png" )
53
52
54
53
@classmethod
55
54
def get_instance (cls ):
@@ -252,18 +251,6 @@ def find_line(self):
252
251
self .set_image_cv (img )
253
252
return coords
254
253
255
- def find_signal (self ):
256
- angle = None
257
- ts = time .time ()
258
- img = self .get_image ()
259
- signals = img .find_template (self ._img_template )
260
-
261
- logging .info ("signal: %s" , str (time .time () - ts ))
262
- if signals :
263
- angle = signals [0 ].angle
264
-
265
- return angle
266
-
267
254
def find_face (self ):
268
255
face_x = face_y = face_size = None
269
256
img = self .get_image ()
Original file line number Diff line number Diff line change @@ -572,27 +572,6 @@ Blockly.Python['coderbot_adv_findLine'] = function(block) {
572
572
return [ code , Blockly . Python . ORDER_ATOMIC ] ;
573
573
} ;
574
574
575
- Blockly . Blocks [ 'coderbot_adv_findSignal' ] = {
576
- /**
577
- * Block for findSignal function.
578
- * @this Blockly.Block
579
- */
580
- init : function ( ) {
581
- this . setHelpUrl ( Blockly . Msg . LOGIC_BOOLEAN_HELPURL ) ;
582
- this . setColour ( 250 ) ;
583
- this . appendDummyInput ( )
584
- . appendField ( Blockly . Msg . CODERBOT_SENSOR_FINDSIGNAL ) ;
585
- this . setOutput ( true , 'Number' ) ;
586
- this . setTooltip ( Blockly . Msg . LOGIC_BOOLEAN_TOOLTIP ) ;
587
- }
588
- } ;
589
-
590
- Blockly . Python [ 'coderbot_adv_findSignal' ] = function ( block ) {
591
- // Boolean values true and false.
592
- var code = 'get_cam().find_signal()' ;
593
- return [ code , Blockly . Python . ORDER_ATOMIC ] ;
594
- } ;
595
-
596
575
Blockly . Blocks [ 'coderbot_adv_findFace' ] = {
597
576
/**
598
577
* Block for findSignal function.
Original file line number Diff line number Diff line change 304
304
<block type =" coderbot_cam_average" ></block >
305
305
<block type =" coderbot_adv_pathAhead" ></block >
306
306
<block type =" coderbot_adv_findLine" ></block >
307
- <block type =" coderbot_adv_findSignal" ></block >
308
307
<block type =" coderbot_adv_findFace" ></block >
309
308
<block type =" coderbot_adv_findColor" >
310
309
<value name =" COLOR" >
Original file line number Diff line number Diff line change 61
61
<category name =" {% trans %}Vision{% endtrans %}" colour =" 290" >
62
62
<block type =" coderbot_adv_pathAhead" ></block >
63
63
<block type =" coderbot_adv_findLine" ></block >
64
- <block type =" coderbot_adv_findSignal" ></block >
65
64
<block type =" coderbot_adv_findFace" ></block >
66
65
<block type =" coderbot_adv_findColor" >
67
66
<value name =" COLOR" >
You can’t perform that action at this time.
0 commit comments