void startIdleThread(Logging*sharedLogger, Engine *engine) { logger = sharedLogger; // todo: re-initialize idle pins on the fly initIdleHardware(); idlePositionController.init(); scheduleMsg(logger, "initial idle %d", idlePositionController.value); chThdCreateStatic(ivThreadStack, sizeof(ivThreadStack), NORMALPRIO, (tfunc_t) ivThread, NULL); // this is idle switch INPUT - sometimes there is a switch on the throttle pedal // this switch is not used yet if (boardConfiguration->clutchDownPin != GPIO_UNASSIGNED) mySetPadMode2("clutch down switch", boardConfiguration->clutchDownPin, getInputMode(boardConfiguration->clutchDownPinMode)); if (boardConfiguration->clutchUpPin != GPIO_UNASSIGNED) mySetPadMode2("clutch up switch", boardConfiguration->clutchUpPin, getInputMode(boardConfiguration->clutchUpPinMode)); addConsoleAction("idleinfo", showIdleInfo); addConsoleActionI("set_idle_enabled", (VoidInt) setIdleControlEnabled); addConsoleActionII("blipidle", blipIdle); // split this whole file into manual controller and auto controller? move these commands into the file // which would be dedicated to just auto-controller? addConsoleAction("idlebench", startIdleBench); apply(); }
void TextBox::initialize(const char* typeName, Theme::Style* style, Properties* properties) { Label::initialize(typeName, style, properties); if (properties) { _inputMode = getInputMode(properties->getString("inputMode")); } }
int getInputSignalInfo(int identifier,int fd, int cmd, char *data, int vallen) { unsigned char sdata[256] = {0}; int totallen = 0; int cmdlen = sizeof(int); int retlen = sizeof(int); int ret = 0; char info[64] = {0}; getInputMode(info); vallen = strlen(info); totallen = MSGINFOHEAD + cmdlen + vallen + retlen; msgPacket(identifier,sdata, STRING_TYPE, totallen, cmd, ret); memcpy(sdata + totallen - vallen, info, vallen); send(fd, sdata, totallen, 0); return 0; }
int getSignaldetailInfo(int identifier,int fd, int cmd, char *data, int vallen) { #if 1 int i; SIGNAL_STA op; unsigned char sdata[2048] = {0}; int totallen = 0; int cmdlen = sizeof(int); int retlen = sizeof(int); int ret = 0; char tmpbuf[128] = {0}; char displaybuf[2048] = {0}; getInputMode(tmpbuf); i = ioctl(g_gpio_fd, SIGNAL_STA_MODE, &op); DEBUG(DL_DEBUG, "ret=%d,op.HDMI_HDCP=%d,op->HPV=%d,op->RGB_YPRPR=%d,op->TMDS=%d,op->VsyncF=%d\n", i, op.HDMI_HDCP, op.HPV, op.RGB_YPRPR, op.TMDS, op.VsyncF); sprintf(displaybuf, "Signal:\\t %s\\n", tmpbuf); memset(tmpbuf, 0, strlen(tmpbuf)); sprintf(tmpbuf, "HPV:\\t %d\\n", op.HPV); strcat(displaybuf, tmpbuf); memset(tmpbuf, 0, strlen(tmpbuf)); sprintf(tmpbuf, "TMDS:\\t %d\\n", op.TMDS); strcat(displaybuf, tmpbuf); memset(tmpbuf, 0, strlen(tmpbuf)); sprintf(tmpbuf, "VsyncF:\\t %d\\n", op.VsyncF); strcat(displaybuf, tmpbuf); memset(tmpbuf, 0, strlen(tmpbuf)); sprintf(tmpbuf, "HDCP:\\t %d\\n", op.HDMI_HDCP); strcat(displaybuf, tmpbuf); memset(tmpbuf, 0, strlen(tmpbuf)); sprintf(tmpbuf, "RGB_YPRPR: %d\\n", op.RGB_YPRPR); strcat(displaybuf, tmpbuf); vallen = strlen(displaybuf); totallen = MSGINFOHEAD + cmdlen + vallen + retlen; msgPacket(identifier,sdata, STRING_TYPE, totallen, cmd, ret); memcpy(sdata + totallen - vallen, displaybuf, vallen); send(fd, sdata, totallen, 0); return 0; #endif }
void WebEntityItem::appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params, EntityTreeElementExtraEncodeDataPointer entityTreeElementExtraEncodeData, EntityPropertyFlags& requestedProperties, EntityPropertyFlags& propertyFlags, EntityPropertyFlags& propertiesDidntFit, int& propertyCount, OctreeElement::AppendState& appendState) const { bool successPropertyFits = true; APPEND_ENTITY_PROPERTY(PROP_COLOR, getColor()); APPEND_ENTITY_PROPERTY(PROP_ALPHA, getAlpha()); withReadLock([&] { _pulseProperties.appendSubclassData(packetData, params, entityTreeElementExtraEncodeData, requestedProperties, propertyFlags, propertiesDidntFit, propertyCount, appendState); }); APPEND_ENTITY_PROPERTY(PROP_BILLBOARD_MODE, (uint32_t)getBillboardMode()); APPEND_ENTITY_PROPERTY(PROP_SOURCE_URL, getSourceUrl()); APPEND_ENTITY_PROPERTY(PROP_DPI, getDPI()); APPEND_ENTITY_PROPERTY(PROP_SCRIPT_URL, getScriptURL()); APPEND_ENTITY_PROPERTY(PROP_MAX_FPS, getMaxFPS()); APPEND_ENTITY_PROPERTY(PROP_INPUT_MODE, (uint32_t)getInputMode()); APPEND_ENTITY_PROPERTY(PROP_SHOW_KEYBOARD_FOCUS_HIGHLIGHT, getShowKeyboardFocusHighlight()); }