BUILD_NAME=_N9
fi
+if [ "$1" == "ln" ]
+then
+TARGET_PACK_NAME=pack_brandy_native_js_ln
+APPLICATION_NAME=brandy-native-js-ln
+RECOVERY_NAME=$APPLICATION_NAME-r
+SSB_NAME=$APPLICATION_NAME-ssb
+BUILD_NAME=_LN
+fi
+
if [ "$1" == "hso" ]
then
HSO_BUILD=hso
if("SUPPORT_AUTO_OTA" IN_LIST DEFINES)
add_subdirectory_if_exist(auto_ota)
endif()
+if("BOARD_LEINIAO" IN_LIST DEFINES)
+ add_subdirectory_if_exist(ln)
+endif()
if("BOARD_N9" IN_LIST DEFINES)
add_subdirectory_if_exist(n9)
endif()
'GPIO_POWERON_FLASH'
]
},
+
+ ################# leiniao ############################
+ 'brandy-native-js-ln': {
+ 'base_target_name': 'brandy-native-js',
+ #自定义配置项,选择硬件及功能参数
+ 'defines': [
+ 'BOARD_FD230',
+ 'BOARD_LEINIAO',
+ # cat1 相关配置
+ 'FT_SINGLE_UART',
+ 'ENABLE_SLIP',
+ 'SUPPORT_CAT1_SERVICE',
+ 'SUPPORT_TCPIP',
+
+ 'CONFIG_EFUSE_READ_TO_RAM',
+ 'CUSTOM_UTILS',
+ # 'CUSTOM_HID_SERVICE',
+ # 'WEARABLE_LOG_DEBUG',
+ 'SUPPORT_RC_CALIBRATION',
+ # 'PPG_HX3695',
+ 'VIB_USE_PWM',
+ 'CONFIG_PWM_SUPPORT',
+ # 'ACC_LIS2DOC',
+ # 'ENABLE_CUSTOM_I2C',
+ #'ENABLE_VIBRATOR',
+ # 'ENCODER_SUPPORT',
+ # 'SUPPORT_SPO2_NOTIFICATION',
+ # 'SUPPORT_SPO2_NOTIFICATION_TEST',
+ 'SUPPORT_DEVICE_PAIRING_NOTIFICATION',
+ # 'ENABLE_FONT_VECTOR_GLOBAL',
+ # 'ENABLE_SHAPING',
+ 'SUPPORT_CHARGER_PLUG_DETECTION_NOTIFICATION',
+ # 'SUPPORT_AT_CUSTOMUTILS',
+ 'SUPPORT_BLE_SERVICE',
+ # 'SUPPORT_MAG_SERVICE',
+ # 'SUPPORT_PPG_SERVICE',
+ # 'SUPPORT_CYWEE_SERVICE',
+ 'SUPPORT_BATTERY_SERVICE',
+ 'FD230',
+ # 'SUPPORT_AUTO_OTA_SERVER',
+ # 'CONFIG_DFX_SUPPORT_DIAG_UP_MACHINE=1',
+ #"MEM_CHECK",
+ #'ENABLE_WEBSOCKET',
+ # 'CYWEE_MAC_ACTIVE',
+ #'SUPPORT_HID_SERVICE',
+ # 'SUPPORT_BAIDU_MAP',
+ 'CFG_FLASH_SIZE=16',
+ 'SINGLE_USER_PARTITION',
+ # 'TPTYPE_FT6X46',
+ # 'ROTARYENCODER_HX3507',
+ 'NANDFLASH_DS35X',
+ 'BLE_INSTRUCT',
+ # 'AILPAY_SUPPORT',
+ # 'SUPPORT_FACTORY_SERVICE',
+ # 'MEMORY_CORRUPTION',
+
+ ],
+ #添加自定义应用
+ 'ram_component': [
+ 'audio_at_service',
+ 'media_at_service',
+ 'bt_manager_at_service',
+ # "ppg_sensor_hx3695",
+ # "ppgBleService",
+ # "mag_sensor_mmc5603",
+ "vibrator",
+ "vibrator_service",
+ # "-:lwip",
+ "cat1Service",
+ "cat1Test",
+ "audio_manager",
+ "CustomUIcomponentTool",
+ "nativeabilityfwk",
+ "custom_utils",
+ "custom_utilscpp",
+ "custom_config",
+ "rotary_encoder",
+ "nativelauncher",
+ # "ppg_service",
+ # "cywee_service",
+ "batterry_service",
+ "bleservice",
+ "blemoder",
+ "transspecard",
+ # "factorytest_service",
+ # "hid_service",
+ "producttest",
+ # "ppg_hal",
+ # "mag_service",
+ # "cywee_dml",
+ #"cyweeBleService",
+ ],
+ 'image_analysis': False,
+ 'fs_image_path':'fd230',
+ 'ssb_version': 'brandy-native-js-ln-ssb',
+ # 'fs_image_path':'evb',
+ 'fs_image': True
+ },
+ 'brandy-native-js-ln-r': {
+ 'base_target_name': 'brandy-native-js-r',
+ #自定义配置项,选择硬件及功能参数
+ 'defines': [
+ 'BOARD_FD230',
+ 'BOARD_LEINIAO',
+ 'FT_SINGLE_UART',
+ 'NANDFLASH_DS35X',
+ # 'TPTYPE_FT6X46',
+ 'CFG_FLASH_SIZE=16',
+ 'FD230',
+ 'SINGLE_USER_PARTITION'
+ ],
+ 'ram_component': ["at_cmd"]
+ },
+ 'brandy-native-js-ln-ssb': {
+ 'base_target_name': 'brandy-ssb',
+ #自定义配置项,选择硬件及功能参数
+ 'defines': [
+ 'BOARD_FD230',
+ 'BOARD_LEINIAO',
+ 'FT_SINGLE_UART',
+ 'ENABLE_ECC',
+ 'CFG_DRIVERS_NANDFLASH',
+ 'CFG_FLASH_SIZE=16',
+ 'FD230',
+ 'NANDFLASH_DS35X'
+ ]
+ },
}
target_group = {
'pack_brandy_native_js_u8': ['brandy-native-js-u8-ssb', 'brandy-native-js-u8-r', 'brandy-native-js-u8'],
'pack_brandy_native_js_w9': ['brandy-native-js-w9-ssb', 'brandy-native-js-w9-r', 'brandy-native-js-w9'],
'pack_brandy_native_js_n9': ['brandy-native-js-n9-ssb', 'brandy-native-js-n9-r', 'brandy-native-js-n9'],
+ 'pack_brandy_native_js_ln': ['brandy-native-js-ln-ssb', 'brandy-native-js-ln-r', 'brandy-native-js-ln'],
'pack_brandy_native_js_lt22': ['brandy-native-js-lt22-ssb', 'brandy-native-js-lt22-r', 'brandy-native-js-lt22'],
'pack_brandy_native_js_xts': ['brandy-native-js-xts-ssb', 'brandy-native-js-xts-r', 'brandy-native-js-xts'],
--- /dev/null
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
--- /dev/null
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
--- /dev/null
+# Generated by Kconfig Tool.
+# Note: !!!This file can not be modify manually!!!
+
+#
+# Main menu description, show how to use this configuration system.
+#
+
+#
+# Product
+#
+
+#
+# Config the product.
+#
+CONFIG_NORFLASH_SIZE=16
+
+CONFIG_PSRAM_DENSITY_MB=32
+# end of Product
{ \r
if(uapi_dev_runtime_get_cat1_powerstat())\r
uapi_set4GCapability(false);\r
- #ifdef FD230\r
+ #ifdef SUPPORT_FACTORY_SERVICE\r
factorytest_start_aging_test();\r
#endif\r
}\r
if(strcmp(view.GetViewId(),"stop") == 0)\r
{ \r
- #ifdef FD230\r
- factorytest_stop_aging_test();\r
- #endif\r
+#ifdef SUPPORT_FACTORY_SERVICE\r
+ factorytest_stop_aging_test();\r
+#endif\r
}\r
if(strcmp(view.GetViewId(),"exit") == 0)\r
{ \r
#include "producttest/include/testPresenter.h"
#include "producttest/include/testgsenson.h"
#include "cmsis_os2.h"
-#include "cywee_hal.h"
+
#include "producttest/include/testView.h"
#include "math.h"
#ifdef __cplusplus
#endif
#include "pm_veto.h"
#include "pm.h"
+#ifdef SUPPORT_CYWEE_SERVICE
+ #include "cywee_hal.h"
+#endif
+
#ifdef __cplusplus
#if __cplusplus
}
}
testGsonsonScrollView->Add(title);
/* -------------------------------------------------------------------------- */
+ char buf[124]={0};
+#ifdef SUPPORT_CYWEE_SERVICE
gsenson_t t;
// get_gsonsen_xyz(&t);
- char buf[124]={0};
sprintf(buf,"X:%.2f\nY:%.2f\nZ:%.2f",t.x,t.y,t.z);
+#endif
Config = {
.left = 173,
.top = 160,
#include "custom_utils.h"
#include "producttest/include/testPresenter.h"
#include "producttest/include/testmagnetic.h"
-#include "mag_service.h"
#include "cmsis_os2.h"
#include "producttest/include/testView.h"
// #define TEST_BATTERY
#include "pm.h"
#ifdef SUPPORT_MAG_SERVICE
#include "mag_hal.h"
+ #include "mag_service.h"
#endif
#ifdef __cplusplus
#if __cplusplus
static testoldView *g_pSystemAboutTheWatchView{nullptr};
static osTimerId_t g_aging_timer=NULL;
- #ifdef FD230
+#ifdef SUPPORT_FACTORY_SERVICE
static ble_aging_t aging_t;
- #endif
-
-
+#endif
testoldView::testoldView()
{
void testoldView::setdata(void)
{
+#ifdef SUPPORT_FACTORY_SERVICE
label_flag->SetText((std::string("老化标志:" )+ std::to_string(aging_t.flag)).c_str());
label_target_time->SetText((std::string("目标时间:") + std::to_string(aging_t.target_time)).c_str());
label_left_time->SetText((std::string("剩余时间:" )+ std::to_string(aging_t.left_time)).c_str());
label_mic_error->SetText((std::string("麦克风失败次数:" )+ std::to_string(aging_t.mic_error)).c_str());
label_speaker_error->SetText((std::string("喇叭失败次数:") + std::to_string(aging_t.speaker_error)).c_str());
label_charge_error->SetText((std::string("充电失败次数:" )+ std::to_string(aging_t.charge_error)).c_str());
+#endif
}
void testoldView::ClearAll()
{
do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_AGING_DATA_READ, NULL, 0);
LOS_Msleep(500);
+#ifdef SUPPORT_FACTORY_SERVICE
factorytest_get_aging_data(&aging_t);
+#endif
OHOS::testoldView *pview = OHOS::testoldView::GetInstance();
pview->setdata();
}
#include "bleService.h"
#include <errcode.h>
#include "alipay_app.h"
+#ifdef SUPPORT_FACTORY_SERVICE
#include "factorytestService.h"
+#endif
#include <time.h>
#include <cmsis_os2.h>
#include <stdint.h>
}
// 发送数据
+#ifdef SUPPORT_FACTORY_SERVICE
ble_factorytest_server_send_ota_report(buf, 17 + current_datalen + 1);
+ #endif
printf("发送第 %u 个分包(总 %u 包)\n", current_packet, send_packet_total);
msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
}
// 发送数据
+#ifdef SUPPORT_FACTORY_SERVICE
ble_factorytest_server_send_ota_report(buf, 17 + current_datalen + 1);
+#endif
// printf("发送第 1 个分包(总 1 包)\n");
msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
memcpy(retransmit_req + 15, &temp_32, 2); // 包数据长度
retransmit_req[17] = packet_id;
retransmit_req[18] = calculate_CRC_transspecard(retransmit_req, 18); // 计算CRC校验码
+#ifdef SUPPORT_FACTORY_SERVICE
ble_factorytest_server_send_ota_report(retransmit_req, 19);
+#endif
msleep(PACKET_DELTA_TIMEOUT); // 增加延时,确保可以成功发送成功
free(retransmit_req);
int current_len = strlen(pgnss_log);\r
int data_len = strlen(temp_buf);\r
if (current_len + data_len < 2047) { // 留1字节给字符串结束符\r
- // strcat(pgnss_log, temp_buf);\r
snprintf(pgnss_log + current_len, 2048 - current_len, "%s", temp_buf);\r
}\r
}\r
#include "custom_utils.h"
#include "debug_print.h"
#include "custom_runtime.h"
+#ifdef SUPPORT_FACTORY_SERVICE
#include "factorytest_protocol.h"
+#endif
#include "los_base.h"
#ifdef SUPPORT_CUSTOM_CONFIG
#include "ConfigModelC.h"