miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.77k stars 1.44k forks source link

Example 'RFID-Cloner' prompts warning due to dash in name #392

Closed richelbilderbeek closed 6 years ago

richelbilderbeek commented 6 years ago

Step 1: Describe your environment

Step 2: Describe the problem

When I successfully install this library, most of the examples are added to the File | Examples menu. Except for RFID-Cloner, of which a warning dialog appears, as it has a dash in its name. Every restart of the Arduino IDE, this warning re-appears.

2018-06-24-091908_629x186_scrot

Affected file(s) or example(s):

Steps to reproduce:

  1. sudo apt install arduino
  2. Download this library as a zip, this zip will be called rfid-master.zip
  3. Unzip that zip. A folder rfid-master will be created
  4. Rename that folder to RFID
  5. In the Arduino IDE, click Import Library and select the RFID folder. The first warning about the dash in the name of the RFID-Cloner example appears
  6. When restarting the Arduino ID, the warning appears

2018-06-24-091908_629x186_scrot

  1. It can be fixed by simply renaming the folder RFID-Cloner to RFID_Cloner and its file RFID-Cloner.ino to RFID_Cloner.ino

I volunteer to do a Pull Request with the renamed example folder. Just assign this Issue to me :-)

Observed Results:

I get a warning that RFID-Cloner is a name with a dash.

Expected Results:

That I can start the Arduino IDE without warnings

Relevant Code:

  // TODO(you): code here to reproduce the problem
  // No code is needed
Rotzbua commented 6 years ago

Hi, your IDE version is 1.0.5 right? This version has several problems (one you mentioned), so the minimum IDE version was set to 1.6. It is mentioned in the readme under Compatible IDE.

This library works with Arduino IDE 1.6, older versions are not supported and will cause compiler errors.

Best

richelbilderbeek commented 6 years ago

I fully agree it is well documented.

I suggest (and volunteer) to do a simple rename, so that older IDE versions don't have this warning. I feel the costs outweigh the benefits, but of course, I do have less understanding of the consequences of such a rename.

Rotzbua commented 6 years ago

It would not compile anyway, because version 1.0.X has no enabled c++11 support.

richelbilderbeek commented 6 years ago

Yes, you are right.

The goal of documenting it is to prevent other people wasting their time in finding this out.