On 20/09/13 00:02, Dan Smith wrote:
+# This SHOULD be a different model number but at present it returns the same as the AnyTone +# expect this to change in future firmware releases.
- @classmethod
- def match_model(cls, filedata, filename):
return filedata[0x21:0x28] == "QX588UV"
+# return filedata[0x21:0x28] == "HR-2040"
This makes it intentionally mis-detect files, instead of letting the other one win. Doesn't this fail the detect test? I would think it should.
Can you make this just return False so that it never matches anything (and thus the Anytone driver will always win)? Since this is functionally no different (especially from the testing-an-image perspective) I don't think we need this.
Otherwise, I think this looks good.
Thanks!
Hi, I have improved the detection so that it will correctly determine a .img file from an AnyTone or a Intek. A modified patch is attached.