@@ -29,7 +29,6 @@ @interface PTDBean () <CBPeripheralDelegate, AppMessagingLayerDelegate, OAD_Dele
29
29
@property (nonatomic , readwrite ) BOOL uploadInProgress;
30
30
@property (nonatomic , readwrite ) NSString *sketchName;
31
31
@property (nonatomic , readwrite ) NSString *targetFirmwareVersion;
32
- @property (nonatomic , copy ) void (^sketchErasedHandler)(BOOL sketchErased);
33
32
@property (nonatomic , copy ) void (^firmwareVersionAvailableHandler)(BOOL firmwareAvailable, NSError *error);
34
33
@property (nonatomic , copy ) void (^hardwareVersionAvailableHandler)(BOOL hardwareAvailable, NSError *error);
35
34
@@ -363,27 +362,6 @@ - (void)cancelFirmwareUpdate{
363
362
}
364
363
}
365
364
366
- // Deprecated
367
- - (void )eraseSketchWithHandler : (void (^)(BOOL sketchErased))handler {
368
-
369
- if ([self .sketchName isEqualToString: @" " ]) {
370
- if (handler) {
371
- handler (YES );
372
- }
373
- return ;
374
- }
375
-
376
- // program a nil image and image name to clear sketch
377
- self.sketchErasedHandler = handler;
378
- #if TARGET_OS_IPHONE
379
- [self setLedColor: [UIColor colorWithRed: 0 green: 0 blue: 0 alpha: 1 ]];
380
- #else
381
- [self setLedColor: [NSColor colorWithRed: 0 green: 0 blue: 0 alpha: 1 ]];
382
- #endif
383
- [self programArduinoWithRawHexImage: nil andImageName: @" " ];
384
- [self readArduinoSketchInfo ];
385
- }
386
-
387
365
#pragma mark - Protected Methods
388
366
-(id )initWithPeripheral : (CBPeripheral*)peripheral beanManager : (id <PTDBeanManager>)manager {
389
367
self = [super initWithPeripheral: peripheral];
@@ -801,13 +779,6 @@ -(void)appMessagingLayer:(AppMessagingLayer*)layer recievedIncomingMessageWithID
801
779
NSDate *date = [NSDate dateWithTimeIntervalSince1970: meta.timestamp];
802
780
self.sketchName = name;
803
781
_dateProgrammed = date;
804
-
805
- // check for sketch erased handler
806
- if (self.sketchErasedHandler ) {
807
- // execute sketch erased handler and clear
808
- self.sketchErasedHandler ([name isEqualToString: @" " ]);
809
- self.sketchErasedHandler = nil ;
810
- }
811
782
812
783
if (self.delegate && [self .delegate respondsToSelector: @selector (bean:didUpdateSketchName:dateProgrammed:crc32: )]) {
813
784
[self .delegate bean: self didUpdateSketchName: name dateProgrammed: date crc32: meta.hexCrc];
0 commit comments