@@ -41,6 +41,7 @@ export class CommandToXRPMgr {
4141 private DEBUG_CONSOLE_ON : boolean = true ;
4242 private HAS_MICROPYTHON : boolean = false ;
4343 private is_XRP_MP : boolean = false ;
44+ private is_NanoXRP : boolean = false ;
4445
4546 private latestLibraryVersion : string = "" ;
4647
@@ -226,6 +227,8 @@ export class CommandToXRPMgr {
226227 this . PROCESSOR = 2350 ;
227228 } else if ( hiddenLines [ 1 ] . includes ( 'RP2040' ) ) {
228229 this . PROCESSOR = 2040 ;
230+ this . is_NanoXRP = hiddenLines [ 1 ] . includes ( 'NanoXRP' ) ;
231+ this . connection ?. setNanoXRP ( this . is_NanoXRP ) ;
229232 }
230233 }
231234 if ( hiddenLines [ 1 ] . includes ( 'XRP' ) ) { //is this an XRP version of microPython?
@@ -250,7 +253,9 @@ export class CommandToXRPMgr {
250253 this . XRPId = undefined ;
251254 this . lastRun = undefined ;
252255 this . HAS_MICROPYTHON = true ; // this is set after connection is successful
253-
256+ this . is_NanoXRP = false ;
257+ this . connection ?. setNanoXRP ( false ) ;
258+
254259 //get version information from the XRP
255260 const info = await this . getVersionInfo ( ) ;
256261
@@ -1031,6 +1036,20 @@ export class CommandToXRPMgr {
10311036 return ( this . PROCESSOR ! === 2350 ) ? "RP2350" : "RPI-RP2" ;
10321037 }
10331038
1039+ /**
1040+ * getFirmwareFilename
1041+ * @returns the firmware filename for the connected robot
1042+ */
1043+ getFirmwareFilename ( ) : string {
1044+ if ( this . PROCESSOR === 2350 ) return 'firmware2350.uf2' ;
1045+ if ( this . is_NanoXRP ) return 'firnware2040nanoxrp.uf2' ;
1046+ return 'firmware2040.uf2' ;
1047+ }
1048+
1049+ isNanoXRP ( ) : boolean {
1050+ return this . is_NanoXRP ;
1051+ }
1052+
10341053 /**
10351054 * getMPFilename
10361055 * @returns the MicroPython filename
0 commit comments