Eric Wu / Mbed 2 deprecated WifiRobot

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers irobotError.cpp Source File

irobotError.cpp

00001 #include "irobotError.h"
00002 
00003 int32_t irobot_StatusMerge(
00004     int32_t * const status,
00005     const int32_t  newStatus
00006 ){
00007     if (!status){
00008         return ERROR_INVALID_PARAMETER;
00009     }
00010     else if(!irobot_IsError(*status)
00011         && (*status == ERROR_SUCCESS || irobot_IsError(newStatus))
00012     ){
00013         *status = newStatus;
00014     }
00015 
00016     return *status;
00017 }