File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -114,13 +114,14 @@ def set_command_up(self):
114
114
self .image = pygame .image .load (self .img_co_up ).convert_alpha ()
115
115
else :
116
116
self .image = pygame .image .load (self .img_disco ).convert_alpha ()
117
- if not self .emitted_power + POWER_CONTROL_STEP > UE_MAX_EMITTED_POWER :
118
- self .emitted_power += POWER_CONTROL_STEP
119
- elif ( self .emitted_power < UE_MAX_EMITTED_POWER and
120
- self . emitted_power + POWER_CONTROL_STEP > UE_MAX_EMITTED_POWER ) :
121
- self .emitted_power = UE_MAX_EMITTED_POWER
117
+ if self .emitted_power < UE_MAX_EMITTED_POWER :
118
+ if not self .emitted_power + POWER_CONTROL_STEP > UE_MAX_EMITTED_POWER :
119
+ self .emitted_power += POWER_CONTROL_STEP
120
+ else :
121
+ self .emitted_power = UE_MAX_EMITTED_POWER
122
122
else :
123
123
self .set_device_disconnected ()
124
+ print "Device disconnected : can't command up"
124
125
125
126
def set_command_down (self ):
126
127
"""Set the command of the device to COMMAND_DOWN.
Original file line number Diff line number Diff line change @@ -317,16 +317,13 @@ def open_loop(self):
317
317
print "UE target (dBm) : " , device .target
318
318
print ""
319
319
else :
320
- if device .emitted_power < UE_MAX_EMITTED_POWER :
321
- device .emitted_power += POWER_CONTROL_STEP
322
- device .set_command_up ()
323
- else :
324
- device .set_device_disconnected ()
320
+ device .set_command_up ()
325
321
j += 1
326
322
i += 1
327
323
device .open_looped = True
328
324
if device .status != CONNECTED :
329
325
device .set_device_disconnected ()
326
+ print "Device disconnected : end of open loop"
330
327
331
328
def outer_loop (self ):
332
329
"""Implementation of the outer loop.
You can’t perform that action at this time.
0 commit comments