From 0aad3753637220d960fcedebcc9ac2cdc1aa507e Mon Sep 17 00:00:00 2001 From: Jörg Hohensohn Date: Fri, 2 Jan 2004 07:48:02 +0000 Subject: checks relaxed again, to tolerate firmware 1.15-1.29 for recorders git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4186 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/firmware_flash.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/apps/plugins/firmware_flash.c b/apps/plugins/firmware_flash.c index d16a847bb2..4abd8dd1bd 100644 --- a/apps/plugins/firmware_flash.c +++ b/apps/plugins/firmware_flash.c @@ -44,11 +44,9 @@ #define ID_PLAYER 2 #define ID_REC_V2 3 -/* We should never check for ARCHOS_* defines in source code. We must - check for features/hardware that have been defined in config-*.h files. - This makes it easier for us to maintain portability. */ -#define A_SUPPORTED_PLATFORM 1 - +/* Here I have to check for ARCHOS_* defines in source code, which is + generally strongly discouraged. But here I'm not checking for a certain + feature, I'm checking for the model itself. */ #if defined(ARCHOS_PLAYER) #define FILE_TYPE "player" #define KEEP VERSION_ADR /* keep the firmware version */ @@ -66,11 +64,10 @@ #define KEEP MASK_ADR /* keep the mask value */ #define PLATFORM_ID ID_FM #else -/* this platform is not (yet) flashable */ -#undef A_SUPPORTED_PLATFORM +#undef PLATFORM_ID /* this platform is not (yet) flashable */ #endif -#ifdef A_SUPPORTED_PLATFORM +#ifdef PLATFORM_ID /* result of the CheckFirmwareFile() function */ typedef enum @@ -286,7 +283,7 @@ bool CheckPlatform(int platform_id, UINT16 version) { /* it can be a FM or V2 recorder */ return (platform_id == ID_FM || platform_id == ID_REC_V2); } - else if (version >= 118 && version <= 128) + else if (version >= 115 && version <= 129) { /* the range of Recorders seen so far */ return (platform_id == ID_RECORDER); } @@ -1008,5 +1005,5 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) return PLUGIN_OK; } -#endif /* ifdef A_SUPPORTED_PLATFORM */ +#endif /* ifdef PLATFORM_ID */ #endif /* #ifndef SIMULATOR */ -- cgit v1.2.3