I tried everything I could think of, including switching from version 1.0.5 of the Arduino IDE to version 1.5.7. Still get the same results, a conflict between my sketch trying to define the PinChangeInt functions and them already being defined in MyGateway.cpp. So I turned on verbose logging in the compiler and see it is hitting every .cpp file in the MySensors library folder. So I decided to try something else, compiling one of the example sketches. Well, it looks like the compiler is including at least something from MyGateway.cpp in every sketch. Here is what I found:
Compiled example sketch BatteryPoweredSensor -
With MySensors library folder as distributed:
Sketch uses 17,732 bytes (57%) of program storage space. Maximum is 30,720 bytes.
Global variables use 476 bytes (23%) of dynamic memory, leaving 1,572 bytes for local variables. Maximum is 2,048 bytes.
Removing MyGateway.cpp from the MySensors library folder:
Sketch uses 17,146 bytes (55%) of program storage space. Maximum is 30,720 bytes.
Global variables use 443 bytes (21%) of dynamic memory, leaving 1,605 bytes for local variables. Maximum is 2,048 bytes.
Compiled example sketch BinarySwitchSensor -
With MySensors library folder as distributed:
Sketch uses 14,766 bytes (48%) of program storage space. Maximum is 30,720 bytes.
Global variables use 436 bytes (21%) of dynamic memory, leaving 1,612 bytes for local variables. Maximum is 2,048 bytes.
Removing MyGateway.cpp from the library folder:
Sketch uses 14,190 bytes (46%) of program storage space. Maximum is 30,720 bytes.
Global variables use 403 bytes (19%) of dynamic memory, leaving 1,645 bytes for local variables. Maximum is 2,048 bytes.
So, the compiled sketch is using 586 bytes more storage and 33 bytes more dynamic memory when MyGateway.cpp is present in
the MySensors library folder. Both sketches seem to run fine compiled without MyGateway.cpp.
MyMQTT.cpp is a gateway for a different controller, right? That one has no effect on the size of the compile sketch whether it is present in the folder or not. So there is something strange about the way MyGateway.cpp is constructed, it puts something in the compiled sketch that doesn't seem to be needed but doesn't generate any compile errors if it not present.
I see there is an update to 1.4 that has been released. I have not tried that yet. What is the recommended method for installing the update? Just download the full zip and overwrite all the files?