bug fix: flash is not available on all platforms
This commit is contained in:
parent
839b6111d6
commit
21c8496858
1 changed files with 5 additions and 6 deletions
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: MspMoteID.java,v 1.3 2008/04/01 08:07:58 fros4943 Exp $
|
* $Id: MspMoteID.java,v 1.4 2008/06/27 14:04:46 nifi Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.mspmote.interfaces;
|
package se.sics.cooja.mspmote.interfaces;
|
||||||
|
@ -35,14 +35,11 @@ import java.util.Collection;
|
||||||
import java.util.Observable;
|
import java.util.Observable;
|
||||||
import java.util.Observer;
|
import java.util.Observer;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.jdom.Element;
|
import org.jdom.Element;
|
||||||
|
import se.sics.cooja.Mote;
|
||||||
import se.sics.cooja.*;
|
|
||||||
import se.sics.cooja.AddressMemory.UnknownVariableException;
|
import se.sics.cooja.AddressMemory.UnknownVariableException;
|
||||||
import se.sics.cooja.interfaces.MoteID;
|
import se.sics.cooja.interfaces.MoteID;
|
||||||
import se.sics.cooja.mspmote.MspMote;
|
import se.sics.cooja.mspmote.MspMote;
|
||||||
|
@ -85,7 +82,9 @@ public class MspMoteID extends MoteID {
|
||||||
/* Write node ID to flash */
|
/* Write node ID to flash */
|
||||||
if (GENERATE_ID_HEADER) {
|
if (GENERATE_ID_HEADER) {
|
||||||
SkyFlash flash = mote.getInterfaces().getInterfaceOfType(SkyFlash.class);
|
SkyFlash flash = mote.getInterfaces().getInterfaceOfType(SkyFlash.class);
|
||||||
flash.writeIDheader(newID);
|
if (flash != null) {
|
||||||
|
flash.writeIDheader(newID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue