fix showAnimation and scrollImage (#408)
This commit is contained in:
		
				
					committed by
					
						
						Peli de Halleux
					
				
			
			
				
	
			
			
			
						parent
						
							725517a1d6
						
					
				
				
					commit
					698001db31
				
			@@ -87,7 +87,7 @@ namespace basic {
 | 
			
		||||
    //% help=basic/show-animation imageLiteral=1 async
 | 
			
		||||
    //% parts="ledmatrix"
 | 
			
		||||
    void showAnimation(ImageLiteral leds, int interval = 400) {
 | 
			
		||||
      uBit.display.animate(MicroBitImage(imageBytes(leds)), interval, 5, 0);
 | 
			
		||||
      uBit.display.animate(MicroBitImage(imageBytes(leds)), interval, 5, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ namespace ImageMethods {
 | 
			
		||||
    //% parts="ledmatrix"
 | 
			
		||||
    void scrollImage(Image id, int frameOffset, int interval) {
 | 
			
		||||
      MicroBitImage i(id);
 | 
			
		||||
      uBit.display.animate(i, interval, frameOffset, MICROBIT_DISPLAY_WIDTH - 1);
 | 
			
		||||
      uBit.display.animate(i, interval, frameOffset, MICROBIT_DISPLAY_ANIMATE_DEFAULT_POS, 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user