output warning if radio shuts down during transmission
This commit is contained in:
parent
01e9498dd9
commit
7e6fbd9f7b
1 changed files with 4 additions and 1 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: SkyByteRadio.java,v 1.16 2009/11/25 10:01:55 fros4943 Exp $
|
* $Id: SkyByteRadio.java,v 1.17 2009/11/25 15:18:11 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.mspmote.interfaces;
|
package se.sics.cooja.mspmote.interfaces;
|
||||||
|
@ -144,6 +144,9 @@ public class SkyByteRadio extends Radio implements CustomDataRadio {
|
||||||
if (isReceiverOn()) {
|
if (isReceiverOn()) {
|
||||||
lastEvent = RadioEvent.HW_ON;
|
lastEvent = RadioEvent.HW_ON;
|
||||||
} else {
|
} else {
|
||||||
|
if (isTransmitting()) {
|
||||||
|
logger.fatal("Turning off radio while transmitting");
|
||||||
|
}
|
||||||
lastEvent = RadioEvent.HW_OFF;
|
lastEvent = RadioEvent.HW_OFF;
|
||||||
}
|
}
|
||||||
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
lastEventTime = SkyByteRadio.this.mote.getSimulation().getSimulationTime();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue