${model_name}(std::string path, std::string file, bool elementary) : UFO_Model(path, file, elementary) { m_name = std::string("${model_name}"); ParticleInit(); ParamInit(); CustomContainerInit(); ATOOLS::OutputParticles(ATOOLS::msg->Info()); ATOOLS::OutputContainers(ATOOLS::msg->Info()); }
int emxx_yuv_to_jpeg(unsigned char *srcYUVData, int width, int height, FILE *dstJPGfp, int quality,int yuvType) { VIDEODECFUNCPARAMTYPE VideoParam; int ret; //Initialize ParamInit(&VideoParam); yuvData = NULL; //save yuv data jpgFile = NULL; yuvData = srcYUVData; jpgFile = dstJPGfp; switch (yuvType) { case OMF_MC_JPEGD_SAMPLING11: VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV444HV11; break; case OMF_MC_JPEGD_SAMPLING21: VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV422HV21; break; case OMF_MC_JPEGD_SAMPLING12: VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV422HV12; break; case OMF_MC_JPEGD_SAMPLING22: VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV411HV22; break; case OMF_MC_JPEGD_SAMPLING41: VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV411HV41; break; default: FILE_DBG("Invalid H:V Ratio, use HV22 instead"); VideoParam.eColorFormat = (OMX_COLOR_FORMATTYPE)OMF_MC_COLOR_FormatYUV411HV22; break; } //width setting VideoParam.nFrameWidth = width; VideoParam.resize = 1; //height setting VideoParam.nFrameHeight = height; VideoParam.resize = 1; VideoParam.nQFactor = quality; OMX_Init(); printf("start encoding...\n"); FILE_DBG("start encoding..."); return jpege_main(&VideoParam); }
void task_app(void *arg) { (void)arg; __GlobalLock(); watchdog_feed(); if(SysInit()) { DebugPrint(0,"system init failed!! quit\n"); return; } watchdog_feed(); if(ParamInit()) { DebugPrint(0,"param init failed!! quit\n"); return; } watchdog_feed(); // MonitorInit(); RunTimeThread(); InitCenmet(); //´®¿Ú³±í #ifndef TEST_PLC SysCreateTask(SvrCommTask,0,"Svr Comm Task",-1,TASK_GPRS_STK_SIZE,TASK_GPRS_PRIO);//uplink 300 8 #endif #ifdef BIG_CONCENT InitUp485(); #endif // MonitorTask(); #ifdef DEFINE_PLCOMM PlcCommInit(); #endif #ifdef TEST_PLC SysCreateTask(RunTestTask,0,"Test Task",0,200,25);//test 200 25 #endif // SysCreateTask(RunStackCheck,0,"Stack Check Task",0,200,26);//check 200 26 TtyShellStart(); //while(1)Sleep(2000);; }
int main(void) { MainInit(); I2C1init(); RtcInit(); LcdInit(); DataLogInit(); StringInit(); Mct485Init(); FieldInit(); Ads1115Init(); Ads1244Init(); USBInit(); RtuInit(); AdcInit(); TC74Init(); // enable multi-vector interrupts INTEnableSystemMultiVectoredInt(); MainDelay(50); DataLogDateTime(DLOG_SFC_POWERUP); // init param after interrupts are enabled ParamInit(); // wait to init desiccant until after ParamInit DesiccantInit(); string[0].mct[0].chan[4] = 0x7FFF; // // Begin Main Loop // for (;;) { if (test == 1) { test = 0; FieldNewState((FIELD_STATE_m)t1); } USBUpdate(); // called as often as possible //sysTickEvent every ms if (sysTickEvent) { sysTickEvent = 0; sysTicks++; UsbTimeoutUpdate(); LcdUpdate(); // fill time before dropping LCD_E if (sysTicks >= 1000) { sysSec++; sysTicks = 0; mPORTDToggleBits(PD_LED_HEARTBEAT); // These Updates are // called once a second //TODO if any of these are long, we could split them on separate milliseconds. DesiccantUpdate(); AdcUpdate(); TC74Update(); }// end 1 Hz else if (sysTicks == 250) { mPORTDToggleBits(PD_LED_HEARTBEAT); } else if (sysTicks == 500) { mPORTDToggleBits(PD_LED_HEARTBEAT); } else if (sysTicks == 750) { mPORTDToggleBits(PD_LED_HEARTBEAT); } // Complete LcdUpdate() by dropping LCD_E) PORTClearBits(IOPORT_G, PG_LCD_E); // These Updates called once each millisecond RtcUpdate(); I2C1update(); StringUpdate(); Mct485Update(); FieldUpdate(); RtuUpdate(); DessicantFanPWMupdate(); } // if (sysTickEvent) } // for (;;) } // main()