| 3372 | } |
| 3373 | |
| 3374 | void cliFunc_pixelXYTest( char* args ) |
| 3375 | { |
| 3376 | print( NL ); // No \r\n by default after the command is entered |
| 3377 | |
| 3378 | char* curArgs; |
| 3379 | char* arg1Ptr; |
| 3380 | char* arg2Ptr = args; |
| 3381 | |
| 3382 | // Process argument if given |
| 3383 | curArgs = arg2Ptr; |
| 3384 | CLI_argumentIsolation( curArgs, &arg1Ptr, &arg2Ptr ); |
| 3385 | |
| 3386 | // Check for special args |
| 3387 | switch ( *arg1Ptr ) |
| 3388 | { |
| 3389 | case 'a': |
| 3390 | case 'A': |
| 3391 | info_print("All x,y pixel test"); |
| 3392 | Pixel_testPos = 0; |
| 3393 | Pixel_testMode = PixelTest_XY_All; |
| 3394 | return; |
| 3395 | |
| 3396 | case 'r': |
| 3397 | case 'R': |
| 3398 | info_print("x,y pixel roll test"); |
| 3399 | Pixel_testPos = 0; |
| 3400 | Pixel_testMode = PixelTest_XY_Roll; |
| 3401 | return; |
| 3402 | |
| 3403 | case 's': |
| 3404 | case 'S': |
| 3405 | info_print("Stopping x,y pixel test"); |
| 3406 | Pixel_testMode = PixelTest_Off; |
| 3407 | return; |
| 3408 | |
| 3409 | case 'h': |
| 3410 | case 'H': |
| 3411 | // Make sure we aren't too far already |
| 3412 | if ( Pixel_testPos >= Pixel_DisplayMapping_Rows_KLL ) |
| 3413 | { |
| 3414 | Pixel_testPos = 0; |
| 3415 | } |
| 3416 | |
| 3417 | info_print("Horizontal: "); |
| 3418 | printInt16( Pixel_testPos ); |
| 3419 | |
| 3420 | // Iterate over the row |
| 3421 | for ( uint16_t pos = Pixel_DisplayMapping_Cols_KLL * Pixel_testPos; |
| 3422 | pos < Pixel_DisplayMapping_Cols_KLL * ( Pixel_testPos + 1); |
| 3423 | pos++ |
| 3424 | ) |
| 3425 | { |
| 3426 | uint16_t pixel = Pixel_DisplayMapping[ pos ]; |
| 3427 | print(" "); |
| 3428 | printInt16( pixel ); |
| 3429 | |
| 3430 | // Toggle pixel |
| 3431 | Pixel_pixelToggle( (PixelElement*)&Pixel_Mapping[ pixel - 1 ] ); |
nothing calls this directly
no test coverage detected
searching dependent graphs…