#include "calculator/include/CalculatorModel.h"
#include "wearable_log.h"
#include <math.h>
+#include <iostream>
+#include <iomanip>
namespace OHOS {
double number_float=strtod(text_buf,NULL);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%lf %s",number_float,text_buf);
+ char new_buf_[64]={0};
+ sprintf_s(new_buf_,64,"%.010lf",number_float);
+ number_float=strtod(new_buf_,NULL);
+
CalculatorModel::GetInstance()->number_push_stack(number_float);
if( CalculatorModel::GetInstance()->get_stcak_size()>=2)
char new_buf[64]={0};
const char*text_buf=number_string.c_str();
+ double number_float=0;
- double number_float=strtod(text_buf,NULL);
-
- CalculatorModel::GetInstance()->number_push_stack(number_float);
+ if(text_buf[0]>='0' && text_buf[0]<='9')
+ {
+ number_float=strtod(text_buf,NULL);
+ char new_buf_[64]={0};
+ sprintf_s(new_buf_,64,"%.010lf",number_float);
+ number_float=strtod(new_buf_,NULL);
+ CalculatorModel::GetInstance()->number_push_stack(number_float);
+ }
+
number_float =CalculatorModel::GetInstance()->calculate_stack();
+ char new_buf_[64]={0};
+ sprintf_s(new_buf_,64,"%.010lf",number_float);
+ number_float=strtod(new_buf_,NULL);
+
double number_float_=number_float;
int decimal_places = 0;
double frac;
}
}
+#include "dial_sos_c.h"
+
/* 状态复位 */
void StatusReset(void)
{
CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone);
DisshakeTimer();
+
+
// If the call is handling in the notification, the slice is not switched
if (!CallerLogModel::GetInstance()->GetNotifyFlag())
{
PhoneServiceScreenCtr(false);
if(NativeAbility::GetInstance().GetCurSliceId() == VIEW_INCOMING_CALL)
{
+
NativeAbility::GetInstance().Back_CountSlice_make_phone();
}
if (GetCurrCallNum() == 0) {
g_phoneStatus = PHONE_SINGLE_STATUS;
}
+
+ if(get_falg_SOS())
+ {
+ sos_falg_add();
+ }
}
static void WatchFinishHandle(void)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "??????????????????????");
}
g_phoneStatus = PHONE_SINGLE_STATUS;
+
+ if(get_falg_SOS())
+ {
+ sos_falg_add();
+ }
}
void CAT1_ChangeStatusScreendisplay(int lastStatus)
void CallerLogModel::SetCallStatus(bool status)
{
callStatus = status;
+ if(status)
+ sos_falg_clean();
}
bool CallerLogModel::GetCallStatus()