Welcome guest, is this your first visit? Click the "Create Account" button now to join.
Page 363 of 388 FirstFirst ... 263313353361362363364365373 ... LastLast
Results 3,621 to 3,630 of 3877
  1. #3621
    Master
    Join Date
    Nov 2017
    Location
    Romania
    Posts
    336
    Rep Power
    161

    Default

    @luisresende,i encountered same problem I solved by deleting/rename save folder and set iGO from scratch

    Edit I find that in the last speedcam ,the spedcams category cant be tested Somehow i suspected that the problem its in the ;speedcam.lua ,so i replaced speedcam.lua with an older version After that modification im able to test speedcams in the menu ,but another problem appear :fixed camera its displayed as mobile camera on BigSpeedcam ,on the map are displayed corectly
    As i dont have any knowledge in coding (i understand somehow the old coding style but the new one its a pain) i dont know where to look .I will attach the text from the old speedcam.lua and if someone are kind to look above this ,maybe i'll fix it
    All the best Cristian
    Speedcam.lua-OLD for comparation.It's also the one I replaced the new one with. I assume everyone have the new one
    Spoiler: Speedcam.lua-OLD
    ---by pongo---
    MODEL.SET.lua.managespeedcam = BOOL_MODEL(false)
    MODEL.SET.lua.WannaGiveFeedBack = BOOL_MODEL(true)
    MODEL.SET.lua.SpeedCam_Pos = GCOOR_MODEL({lat = 0, lon = 0})
    MODEL.SET.lua.SpeedCam_Type = INT_MODEL(0)
    MODEL.SET.lua.SpeedCam_SpeedLimit = INT_MODEL(0)
    MODEL.SET.lua.SpeedCam_Direction = INT_MODEL(0)
    MODEL.SET.lua.SpeedCam_Direction_type = INT_MODEL(0)
    MODEL.SET.lua.SpeedCam_Service = INT_MODEL(0)
    MODEL.SET.lua.SpeedCam_ID = CSTRING_MODEL("")
    MODEL.SET.lua.SpeedCam_Confidence = INT_MODEL(-1)
    MODEL.SET.lua.Speedcam_FirstClick = BOOL_MODEL(true)
    MODEL.SET.lua.AlertFilter = CSTRING_MODEL("")
    MODEL.SETPERSISTENT.lua.HVA_Max_Lockahead = INT_MODEL(500)

    MODEL.SET.lua.vOverspeedAlertDistance = INT_MODEL(350)
    MODEL.SET.lua.vOverspeedTolerance = INT_MODEL(5)
    MODEL.SETPERSISTENT.lua.gApproachBipSound = WSTRING_MODEL(L"!!!")
    MODEL.SETPERSISTENT.lua.AudioSpeedcamOverspeed = WSTRING_MODEL(L"!!!")
    MODEL.SETPERSISTENT.lua.AudioSpeedcamEnd = WSTRING_MODEL(L"!!!")
    MODEL.SET.lua.Overspeed_OR_ZoneEnd = CSTRING_MODEL("")
    MODEL.SET.lua.gjSpeedSound = INT_MODEL(0)
    MODEL.SET.lua.gjSpRepDist = INT_MODEL(0)
    MODEL.SETPERSISTENT.lua.SCaudio_path = WSTRING_MODEL(L"SC1063")
    MODEL.SETPERSISTENT.lua.ApprochingBeepPionttoPoint = BOOL_MODEL(false)
    MODEL.SETPERSISTENT.lua.TimeRepeateAverageSpeed = INT_MODEL(30)
    MODEL.SET.lua.SCaudioSupported = BOOL_MODEL(true)
    MODEL.SET.lua.LastSpeedcamSpeedLimit = INT_MODEL(0)

    MODEL.SETPERSISTENT.lua.SpeedCamAverageSpeed = BOOL_MODEL(false)
    MODEL.SETPERSISTENT.lua.SpeedcamAlarmInBackDist = INT_MODEL(180)
    MODEL.SET.lua.SpeedcamAlarmInBackCount = INT_MODEL(0)
    MODEL.SET.lua.LastSpeedcamCategory = INT_MODEL(0)
    MODEL.SET.lua.LastSpeedcamSpeedLimit = INT_MODEL(0)
    MODEL.SET.lua.DistanceInBack = INT_MODEL(0)
    local Speedcam_On = false
    local SpeedcamInBack_FirstClick = false
    local SayReduce_trigger = false
    local SpeedcamAlarm_ID = -1
    local SpeedcamAlarmInBack_ID = -1
    gLastSpeedcamCategory = -1
    ESpeedcamPassedSentences = {}

    gSpeedCamType = nil
    gSpeedCamDir = nil
    gSpeedCamDirType = nil
    gSpeedCamSpeedLimit = nil
    gSpeedCamSaved = false

    gSpeedCamCatName = ""
    gSpeedCamSoundName = ""

    hook_StartInit:register(function()
    MODEL.lua.SpeedCamAverageSpeed = false
    end)

    hook_SpeedCamInBack_Notification:register(function()
    local speedcat = ""
    for i, camType in var.iter(ui.lm_extendedSpeedCamList) do
    if MODEL.navigation.curr_speedcam.category() == camType.id() then
    speedcat = camType.text()
    break
    end
    end
    tNotifications["alert_point"]["speed_camera_back"].summary = sc_Create_Notification_Text(sc_GetSysEntry("notification.alert_point.speed_camera_back", "summary", ""), speedcat)
    hook_Send_Notification:trigger("alert_point","speed_camera_back")
    if MODEL.warning.is_spoken() and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() then
    sc_Voice_TTS(translated_voice_format("Behind you %s", speedcat))
    end
    end)

    createState("st_EditSpeedcam", {
    extends = {st_CommonMap, st_Popover, st_FooterMenu},
    useLayers = {"ui_EditSpeedcam"},
    skipLayers = {"ui_MapControl"},
    mapstate = "speedcam",
    popover = "ui.lm_SpeedLimitPopover",
    footermenu = "ui.lm_speedcam_footer",
    localmenu = "ui.lm_speedcam_localmenu",
    onmapclick = sc_EmptyMapClick,
    change_mode = function()
    local posx, posy
    local mapLayer = MODEL.map.primary()
    if MODEL.lua.IsLandscape() then
    posx = 20
    posy = 52
    else
    posx = 48
    posy = 28
    end
    mapLayer.center_posx = posx
    mapLayer.center_posy = posy
    end,
    enter = function()
    sc_SaveOriginalSpeedcamParams()
    if MODEL.lua.managespeedcam() then
    MODEL.warning.manage.update_speedcam(MODEL.lua.SpeedCam_ID(), MODEL.lua.SpeedCam_Type(), MODEL.lua.SpeedCam_SpeedLimit(), MODEL.lua.SpeedCam_Direction(), MODEL.lua.SpeedCam_Direction_type())
    MODEL.map.primary.use_small_exclusion_box = 3
    elseif #MODEL.ui.lm_extendedSpeedCamList then
    MODEL.lua.SpeedCam_Type = MODEL.ui.lm_extendedSpeedCamList[0].id()
    end
    end,
    init = function()
    MODEL.warning.speedcam_enabled = false
    if MODEL.lua.managespeedcam() then
    ui.ui_Header.title = m_i18n("Edit alert point")
    else
    ui.ui_Header.title = m_i18n("Add new alert point")
    end
    sc_setDefaultMapZoom()
    doDelayed(1, function() MODEL.map.primary.center_noanim(MODEL.my.map.selected_item.position()) end)
    MODEL.map.primary.show_tmc_icons = false
    end,
    done = function()
    MODEL.warning.speedcam_enabled = true
    MODEL.map.primary.show_tmc_icons = true
    end,
    exit = function()
    if gSpeedCamSaved then
    sc_SaveSpeedcamOK()
    else
    sc_RestoreOriginalSpeedcamParams()
    end
    MODEL.lua.managespeedcam = false
    gSpeedCamSaved = false
    end,
    })

    function sc_AddSpeedcam()
    MODEL.lua.managespeedcam = false
    sc_UpdateSpeedcamModels()
    sc_NextStateAnim(st_EditSpeedcam, "fade", 1, "")
    end

    function sc_SaveOriginalSpeedcamParams()
    gSpeedCamType = MODEL.lua.SpeedCam_Type()
    gSpeedCamDir = MODEL.lua.SpeedCam_Direction()
    gSpeedCamDirType = MODEL.lua.SpeedCam_Direction_type()
    gSpeedCamSpeedLimit = MODEL.lua.SpeedCam_SpeedLimit()
    end

    function sc_RestoreOriginalSpeedcamParams()
    MODEL.lua.SpeedCam_Type = gSpeedCamType
    MODEL.lua.SpeedCam_Direction = gSpeedCamDir
    MODEL.lua.SpeedCam_Direction_type = gSpeedCamDirType
    MODEL.lua.SpeedCam_SpeedLimit = gSpeedCamSpeedLimit
    end

    tmpPrevSpeedcamType = -1

    function sc_EditSpeedcameraType()
    MODEL.warning.check_speedcam_functions()
    sc_NextStateAnim(st_EditSpeedcam_Type, "fade", 1, "")
    end

    createState("st_EditSpeedcam_Type", {
    extends = {st_Common},
    title = m_i18n("Alert type"),
    useLayers = {"ui_EditSpeedcam_Type"},
    init = function()
    local Type = MODEL.lua.SpeedCam_Type()
    tmpPrevSpeedcamType = Type
    for i = 0, #MODEL.ui.lm_extendedSpeedCamList - 1 do
    if MODEL.ui.lm_extendedSpeedCamList[i].id() == Type then
    MODEL.ui.lstSpeedcamType.first_visible_index = i
    return
    end
    end
    end,
    done = function()
    if tmpPrevSpeedcamType != MODEL.lua.SpeedCam_Type() then
    if not sc_GetSpeedCamCatValue(MODEL.lua.SpeedCam_Type(), "useroadspeedlimit") then
    MODEL.lua.SpeedCam_SpeedLimit = 0
    else
    local segmentSpeedLimit = sc_GetSegmentSpeedLimit()
    MODEL.lua.SpeedCam_SpeedLimit = segmentSpeedLimit
    end
    end
    sc_ConvertSpeedToCurrent(MODEL.lua.SpeedCam_SpeedLimit())
    end
    })

    createState("st_SelectSpeedcam", {
    extends = {st_Common},
    useLayers = {"ui_SelectSpeedcam"},
    title = m_i18n("Select a Camera")
    })

    function sc_SpeedcamSelectCameraType()
    if vQuickAdd() then
    ui.vQuickAdd = false
    end
    sc_back()
    end

    function sc_UpdateSpeedcamModels(Model)
    local pos, type, speedlimit, direction, direction_type, service, id
    if Model == nil then
    speedlimit, direction, direction_type = MODEL.warning.manage.get_segment_params()
    pos = MODEL.map.cursor.position()
    if MODEL.warning.speedcam.allowed_in_the_country() then
    type = 0
    else
    type = 6
    end
    id = ""
    service = 3
    else
    pos = Model.position()
    type = Model.category()
    speedlimit = Model.speed_limit()
    direction = Model.heading()
    direction_type = Model.heading_type()
    service = Model.service()
    id = Model.id()
    if Model.EXISTS.confidence() then
    MODEL.lua.SpeedCam_Confidence = Model.confidence()
    else
    MODEL.lua.SpeedCam_Confidence = -1
    end
    end
    MODEL.lua.SpeedCam_Pos = pos
    MODEL.lua.SpeedCam_Type = type
    MODEL.lua.SpeedCam_SpeedLimit = speedlimit
    MODEL.lua.SpeedCam_Direction = direction
    MODEL.lua.SpeedCam_Direction_type = direction_type
    MODEL.lua.SpeedCam_Service = service
    MODEL.lua.SpeedCam_ID = id
    sc_ConvertSpeedToCurrent(speedlimit)
    if not sc_GetSpeedCamCatValue(MODEL.lua.SpeedCam_Type(), "speedlimit") then
    local segmentSpeedLimit = sc_GetSegmentSpeedLimit()
    MODEL.lua.SpeedCam_SpeedLimit = segmentSpeedLimit
    end
    end

    function sc_SaveSpeedcam()
    gSpeedCamSaved = true
    if not #MODEL.map.primary.clicked_speedcam_list then
    CLEARTOSTATE(st_Cockpit)
    else
    sc_back()
    end
    end

    function sc_SaveSpeedcamOK()
    if not sc_GetSpeedCamCatValue(MODEL.lua.SpeedCam_Type(), "speedlimit") then
    MODEL.lua.SpeedCam_SpeedLimit = 0
    end
    if MODEL.lua.managespeedcam() then
    MODEL.warning.manage.update_speedcam(MODEL.lua.SpeedCam_ID(), MODEL.lua.SpeedCam_Type(), MODEL.lua.SpeedCam_SpeedLimit(), MODEL.lua.SpeedCam_Direction(), MODEL.lua.SpeedCam_Direction_type())
    else
    MODEL.warning.manage.add_speedcam(MODEL.lua.SpeedCam_Pos(), MODEL.lua.SpeedCam_Type(), MODEL.lua.SpeedCam_SpeedLimit(), MODEL.lua.SpeedCam_Direction(), MODEL.lua.SpeedCam_Direction_type())
    end
    sc_CopySpeedCamUserList()
    end

    function sc_CopySpeedCamUserList()
    MODEL.ui.lm_clicked_SpeedCamList.clear()
    for item, index in ModelList_iter(MODEL.map.primary.clicked_speedcam_list) do
    if item.service() != 0 and item.service() != 2 then
    ui.lm_clicked_SpeedCamList:add({category = item.category(), confidence = item.confidence(), heading = item.heading(), heading_type = item.heading_type(), icon_phase = item.icon_phase(), id = item.id(), position = item.position(), service = item.service(), speed_limit = item.speed_limit()})
    end
    end
    end

    function sc_EditSpeedcam()
    MODEL.lua.managespeedcam = true
    sc_CopySpeedCamUserList()
    if #MODEL.map.primary.clicked_speedcam_list == 1 then
    sc_UpdateSpeedcamModels(MODEL.map.primary.clicked_speedcam_list[0])
    sc_NextStateAnim(st_EditSpeedcam, "fade", 1, "")
    end
    end

    function sc_EditSpeedcamFromList()
    sc_UpdateSpeedcamModels(MODEL["*"])
    MODEL["*"]._list.setcurrent(index)
    MODEL.lua.managespeedcam = true
    sc_NextStateAnim(st_EditSpeedcam, "fade", 1, "")
    end

    function sc_DeleteSpeedcam()
    if #MODEL.map.primary.clicked_speedcam_list == 1 then
    sc_UpdateSpeedcamModels(MODEL.map.primary.clicked_speedcam_list[0])
    end
    MODEL.warning.manage.delete_speedcam(MODEL.lua.SpeedCam_ID())
    MODEL.warning.manage.dismiss_speedcam(MODEL.lua.SpeedCam_ID())
    MODEL.ui.lm_clicked_SpeedCamList.remove(MODEL.ui.lm_clicked_SpeedCamList.index())
    if #MODEL.ui.lm_clicked_SpeedCamList == 0 then
    uieffect:GRAB()
    CLEARTOSTATE(st_Cockpit)
    uieffect:DO_ANIM("fade", 1, "")
    else
    sc_back()
    end
    end

    function sc_SetSpeedCamTextFooterButton()
    if not MODEL.lua.managespeedcam() or not #MODEL.ui.lm_clicked_SpeedCamList then
    return m_i18n("Save")
    else
    return m_i18n("Edit")
    end
    end

    function sc_EditSelector()
    MODEL.map.primary.update_clicked_speedcam_list()
    MODEL.lua.managespeedcam = true
    if #MODEL.map.primary.clicked_speedcam_list >= 2 then
    sc_CopySpeedCamUserList()
    sc_NextStateAnim(st_SelectSpeedcam, "fade", 1, "")
    else
    sc_EditSpeedcam()
    end
    end

    function sc_ConvertSpeedToCurrent(speedlimit)
    local units = MODEL.regional.units()
    if units == 0 or units == 2 then
    local convertedSpeedLimit = regional.units:convert("Speed", "miles/hour", speedlimit)
    local roundedSpeedLimit = double.round(convertedSpeedLimit):toInt()
    ui_EditSpeedcam.SpeedLimit = roundedSpeedLimit
    else
    ui_EditSpeedcam.SpeedLimit = speedlimit
    end
    end

    function sc_GetSpeedCamCatValue(catID, name)
    local model = MODEL.ui.lm_extendedSpeedCamList.unfiltered_list
    local value
    for item, index in ModelList_iter(model) do
    if item.id() == catID then
    value = item[name]()
    break
    end
    end
    return value
    end

    function sc_GetSegmentSpeedLimit()
    local speedlimit, direction, direction_type
    speedlimit, direction, direction_type = MODEL.warning.manage.get_segment_params()
    return speedlimit
    end

    function sc_GetSpeedCamName()
    for item, idx in ModelList_iter(MODEL.ui.lm_extendedSpeedCamList.unfiltered_list) do
    if item.id() == MODEL.lua.SpeedCam_Type() then
    return item.text()
    end
    end
    end

    function sc_SpeedcamSpeedOnchange(value)
    ui_EditSpeedcam.SpeedLimit = value
    sc_ConvertSpeedToMetric(ui_EditSpeedcam.prop.SpeedLimit(), MODEL.regional.units())
    end

    function sc_ConvertSpeedToMetric(SpeedLimit, units)
    if units == 0 or units == 2 then
    local convertedSpeedLimit = regional.units:convert("Speed", "km/h", SpeedLimit, "miles/hour")
    local roundedSpeedLimit = double.round(convertedSpeedLimit):toInt()
    MODEL.lua.SpeedCam_SpeedLimit = roundedSpeedLimit
    else
    MODEL.lua.SpeedCam_SpeedLimit = SpeedLimit
    end
    end

    function sc_SpeedcameraUseRoadSpeedLimit( id )
    return sc_GetSysEntry("speedcam_category:"..id, "use_road_speedlimit", true )
    end

    createState("st_AlertPointSettings", {
    extends = {st_List, st_Popover, st_LocalMenu},
    title = m_i18n("Alert Points"),
    separator = {[1] = "",[3] = "",[6] = "",[9]="",[13]="",[14]=""},
    listname = "ui.lm_alertpointsettings",
    init = function()
    if MODEL.lua.Overspeed_OR_ZoneEnd() == "bipsound" then
    if MODEL.lua.SelectedAudioFile() != L"---" then
    MODEL.lua.gApproachBipSound = MODEL.lua.SelectedAudioFile()
    end
    MODEL.lua.SelectedAudioFile = L"---"
    elseif MODEL.lua.Overspeed_OR_ZoneEnd() == "Overspeed" then
    if MODEL.lua.SelectedAudioFile() != L"---" then
    MODEL.lua.AudioSpeedcamOverspeed = MODEL.lua.SelectedAudioFile()
    end
    MODEL.lua.SelectedAudioFile = L"---"
    elseif MODEL.lua.Overspeed_OR_ZoneEnd() == "ZoneEnd" then
    if MODEL.lua.SelectedAudioFile() != L"---" then
    MODEL.lua.AudioSpeedcamEnd = MODEL.lua.SelectedAudioFile()
    end
    MODEL.lua.SelectedAudioFile = L"---"
    end
    end,
    exit = function()
    if not MODEL.warning.is_spoken() then
    obs_gjmspcon:START("NO_TRIGGER")
    else
    obs_gjmspcon:STOP()
    end
    end,
    })

    function sc_SetMsgBox()
    MODEL.warning.speedcam_warning = false
    if MODEL.warning.speedcam_enabled() then
    sc_SpeedCamOnMSGbox()
    end
    end

    function sc_SpeedcamWarningEnabled()
    MODEL.warning.speedcam_warning = true
    MODEL.warning.speedcam_enabled = true
    end

    function sc_SpeedcamWarningDisabled()
    MODEL.warning.speedcam_warning = false
    MODEL.warning.speedcam_enabled = false
    end

    function sc_SpeedCamOnMSGbox()
    local message = wstring.format(translate(m_i18n("Using this function may be prohibited by law in certain countries.")) .. translate(m_i18n("Are you sure you want to switch it on anyway?")))
    MODEL.screen.msgbox.create_from({
    line = {message},
    button = {{"sc_SpeedcamWarningEnabled", m_i18n("Switch on"), "", "ico_done.svg"}, {"sc_SpeedcamWarningDisabled", m_i18n("Cancel"), "", "ico_cancel.svg"}}
    })
    if vReadOutSystemMessages() then
    VW_LongTextToSay(message)
    end
    end

    function sc_HVA_Set_Prewarn_Alert_Distance(set_index)
    local t = sc_split(MODEL.warning.hva.prealert_distance_options(), ",")
    if set_index then
    for index, value in pairs(t) do
    if value == tostring(MODEL.lua.HVA_Max_Lockahead()) then
    MODEL.warning.hva.prealert_distance_index = index - 1
    break
    end
    end
    else
    MODEL.lua.HVA_Max_Lockahead = tonumber(t[MODEL.warning.hva.prealert_distance_index() + 1])
    end
    end

    function sc_IsInHVACountry(pos)
    local hva_countries = sc_GetSysEntry("hva", "hva_countries", "fra")
    local current_country = MODEL.other.get_country_by_position(pos):lower()
    return in_set(current_country:match("%a+"), sc_split(hva_countries, ","))
    end

    function sc_AlertTypeFilter(filter)
    MODEL.ui.lm_extendedSpeedCamList.setcurrent(ui.alerttypes[filter]:get_index(ui.alerttypes[filter][index]))
    sc_NextStateAnim(st_ExtendedSpeedCamSettings, "fade", 1, "")
    end

    function sc_btnSpeedCam_OnRelease()
    if sc_IsInHVACountry(MODEL.navigation.car.position()) then
    sc_NextStateAnim(st_DangerZoneSettings, "fade", 1, "")
    else
    sc_NextStateAnim(st_ProximityAlertsSettings, "fade", 1, "")
    end
    end

    createState("st_DangerZoneSettings", {
    extends = {st_CommonList, st_Popover},
    useLayers = {"ui_DangerZoneSettings"},
    title = m_i18n("Dangerous Zone"),
    })

    createState("st_ProximityAlertsSettings", {
    extends = {st_CommonList},
    useLayers = {"ui_ProximityAlertsSettings"},
    title = m_i18n("Select Alert Types"),
    })

    gPrevAudio = nil

    createState("st_ExtendedSpeedCamSettings", {
    extends = {st_CommonList, st_Popover, st_FooterMenu},
    useLayers = {"ui_ExtendedSpeedCamSettings"},
    title = m_i18n("Alert Points"),
    footermenu = "ui.lm_extendedSpeedCamSettings_footermenu",
    enter = function()
    local settings = MODEL.warning()
    local index = MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id()
    local id = MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id()
    gPrevAudio = settings["speedcam_soundtype_" .. tostring(id)]()
    if not gPrevAudio then
    gPrevAudio = 2
    end
    end,
    })

    function sc_SetSpeedCamAudioWarningType(audio)
    local settings = MODEL.warning()
    local index = MODEL.ui.lm_extendedSpeedCamList.index()
    local id = MODEL.ui.lm_extendedSpeedCamList[index].id()
    local sound = "speedcam_soundtype_" .. tostring(id)
    gPrevAudio = audio
    settings[sound] = audio
    end

    function sc_GetSpeedCamAudioWarningType(index)
    local settings = MODEL.warning()
    local index = MODEL.ui.lm_extendedSpeedCamList.index()
    local id = MODEL.ui.lm_extendedSpeedCamList[index].id()
    local audio = settings["speedcam_soundtype_" .. tostring(id)]()
    if (gPrevAudio == 2) then
    return m_i18n("When Approaching")
    elseif (gPrevAudio == 1) then
    return m_i18n("Only When Speeding")
    end
    end

    function sc_SetSpeedCamVisualWarningType(audio, visual)
    local settings = MODEL.warning()
    local index = MODEL.ui.lm_extendedSpeedCamList.index()
    local id = MODEL.ui.lm_extendedSpeedCamList[index].id()
    local show = "speedcam_visualtype_" .. tostring(id)
    local warn = "speedcam_soundtype_" .. tostring(id)
    settings[show] = visual
    if audio then
    settings[warn] = gPrevAudio
    else
    settings[warn] = audio
    end
    end

    function sc_GetSpeedCamVisualWarningType(index)
    local settings = MODEL.warning()
    local index = MODEL.ui.lm_extendedSpeedCamList.index()
    local id = MODEL.ui.lm_extendedSpeedCamList[index].id()
    local visual = settings["speedcam_visualtype_" .. tostring(id)]()
    local audio = settings["speedcam_soundtype_" .. tostring(id)]()
    if audio and visual then
    return m_i18n("Audio and Visual")
    elseif not audio and visual then
    return m_i18n("Visual")
    else
    return m_i18n("Disabled")
    end
    end

    createState("st_SelectSpeedcamForInfo", {
    extends = {st_CommonList},
    title = m_i18n("Select Alert Point"),
    useLayers = {"ui_SelectSpeedcamForInfo"},
    })

    function sc_ShowSpeedcamInfo()
    sc_UpdateSpeedcamModels(MODEL["*"])
    MODEL["*"]._list.setcurrent(index)
    sc_NextStateAnim(st_ShowSpeedcamInfo, "fade", 1, "")
    end

    createState("st_ShowSpeedcamInfo", {
    extends = {st_CommonList, st_FooterMenu},
    title = m_i18n("Alert Point Information"),
    useLayers = {"ui_ShowSpeedcamInfo"},
    enter = function()
    if Plugin:isLoaded("weather") and MODEL.lua.QueryWeather() then
    MODEL.services.weather.request_weather_at_location(MODEL.lua.SpeedCam_Pos())
    end
    end,
    })

    hook_SetMapHeader:register(function()
    if #MODEL.map.primary.clicked_speedcam_list then
    hook_SetMapHeader:prevent_default()
    sc_UpdateMapHeader_Speedcam()
    end
    end)

    hook_OnMapClickNoPoi:register(function()
    if #MODEL.map.primary.clicked_speedcam_list then
    hook_OnMapClickNoPoi:prevent_default()
    MODEL.map.primary.cursor_icon = "cursor_speedcam"
    doDelayed(1, function() sc_UpdateSpeedcamModels(MODEL.map.primary.clicked_speedcam_list[0]) end)
    end
    end)

    hook_PoiMapInfo_NoPoi:register(function()
    if #MODEL.map.primary.clicked_speedcam_list and MODEL.map.primary.cursor_icon() == "cursor_speedcam" then
    hook_PoiMapInfo_NoPoi:prevent_default()
    if #MODEL.map.primary.clicked_speedcam_list == 1 then
    MODEL.map.primary.clicked_speedcam_list.setcurrent(0)
    hook_DetailedInfo:trigger("speedcam")
    sc_NextStateAnim(st_ShowSpeedcamInfo, "fade", 1, "")
    else
    hook_DetailedInfo:trigger("multispeedcam")
    sc_NextStateAnim(st_SelectSpeedcamForInfo, "fade", 1, "")
    end
    end
    end)

    function sc_UpdateMapHeader_Speedcam()
    ui_MapHeader_prop.mapheader_icon = "speedwarn_list.svg"
    ui_MapHeader_prop.mapheader_icon_phase = MODEL.lua.SpeedCam_Type()
    ui_MapHeader_prop.mapheader_text_top = sc_GetSpeedCamName()
    if MODEL.lua.SpeedCam_Type() == 31 and sc_IsInHVACountry(MODEL.my.map.selected_item.position()) then
    ui_MapHeader_prop.mapheader_text_top = m_i18n("High vigilance area. Watch your speed.")
    end
    ui_MapHeader_prop.mapheader_text_bottom = MODEL.my.map.selected_item.address.long_format()
    end

    gFirstClick = true
    gSkippedID = ""

    function sc_ToggleSpeedcamSound()
    if gFirstClick and not MODEL.navigation.curr_speedcam.skipped() then
    gFirstClick = false
    if MODEL.navigation.curr_speedcam.speed_warning_sound_active() then
    MODEL.navigation.curr_speedcam.speed_warning_sound_active = false
    elseif MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() == 0 then
    MODEL.navigation.curr_speedcam.skipped = true
    end
    gSkippedID = MODEL.navigation.curr_speedcam.id()
    else
    MODEL.navigation.curr_speedcam.speed_warning_sound_active = false
    MODEL.navigation.curr_speedcam.skipped = true
    MODEL.lua.Speedcam_FirstClick = false
    gFirstClick = true
    end
    end

    function sc_ResetFirstClick()
    if MODEL.navigation.curr_speedcam.id() == gSkippedID then
    MODEL.lua.Speedcam_FirstClick = false
    else
    gFirstClick = true
    MODEL.lua.Speedcam_FirstClick = true
    end
    end

    function sc_fill_hva_alert(idx)
    local listModel = MODEL.ui.lm_hva_view.hva_alerts
    local hva_array = {is_active = false, remaining_distance = 0}
    if idx != nil and listModel != nil then
    hva_array.is_active = listModel[idx].is_active()
    hva_array.remaining_distance = listModel[idx].remaining_distance()
    end
    return hva_array
    end

    function sc_gjfirstplayspeedcam()
    if MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() then
    local spc_cat = MODEL.navigation.curr_speedcam.category()
    gSpeedCamCatName = "speedcam_category:" .. spc_cat
    gSpeedCamSoundName = sc_GetSysEntry(gSpeedCamCatName, "skin_first_sound", L"")
    if gSpeedCamSoundName != L"" then
    sc_gjspeedcam_playsound(gSpeedCamSoundName)
    end
    local gjSpeedSound = var.new()
    gjSpeedSound = sc_GetSysEntry(gSpeedCamCatName, "skin_speed_sound_delay", 0)
    if gjSpeedSound > 0 then
    killDelayed(gjDel1)
    gjDel1 = doDelayed(gjSpeedSound, function() sc_gjspeedcam_playsound(MODEL.navigation.curr_speedcam.speed_limit()) end)
    end
    MODEL.lua.gjSpRepDist = sc_GetSysEntry(gSpeedCamCatName, "skin_repeat_distance", 0)
    if MODEL.lua.gjSpRepDist() > 0 then
    obs_gjmspcrep:START("NO_TRIGGER")
    end
    end
    end

    function sc_gjrepeatplayspeedcam()
    obs_gjmspcrep:STOP()
    gSpeedCamSoundName = sc_GetSysEntry(gSpeedCamCatName, "skin_repeat_sound", L"")
    if gSpeedCamSoundName != L"" and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() then
    sc_gjspeedcam_playsound(gSpeedCamSoundName)
    end
    end

    local function sc_GetSCAudioFolder()
    if sc_FindInScanGivenFolderList(L"SC9999") then
    local lcid = towstring(MODEL.regional.current_voice.lcid())
    if sc_FindInScanGivenFolderList(L"SC" .. lcid) then
    MODEL.lua.SCaudioSupported = true
    MODEL.lua.SCaudio_path = L"SC" .. lcid
    else
    MODEL.lua.SCaudioSupported = false
    MODEL.lua.SCaudio_path = L"SC9999"
    end
    doDelayed(10, sc_GetSCAudioFolder)
    end
    end

    function sc_LiveSCAudioSettings()
    sc_ScanGivenFolder(L"%app%/ui_nextgen/audio", L"fcategory:0")
    sc_GetSCAudioFolder()
    end

    function sc_gjspeedcam_playsound(snd_nm)
    if snd_nm == L"" then
    return
    end
    local spc_audio_path = var.new()
    spc_audio_path = MODEL.lua.SCaudio_path()
    if spc_audio_path != L"" then
    snd_nm = spc_audio_path .. L"/" .. snd_nm
    end
    MODEL.sound.playchanneltest("alarmeffect", snd_nm)
    end

    function sc_speedcamtest_audio()
    local spc_cat = MODEL.INT.ui.lm_extendedSpeedCamList.current.id()
    gSpeedCamCatName = "speedcam_category:" .. spc_cat
    gSpeedCamSoundName = sc_GetSysEntry(gSpeedCamCatName, "skin_first_sound", L"")
    if gSpeedCamSoundName != L"" then
    sc_gjspeedcam_playsound(gSpeedCamSoundName)
    end
    local gjSpeedSound = var.new()
    gjSpeedSound = sc_GetSysEntry(gSpeedCamCatName, "skin_speed_sound_delay", 0)
    if gjSpeedSound > 0 then
    killDelayed(gjDel1)
    gjDel1 = doDelayed(gjSpeedSound, function() sc_gjspeedcam_playsound(50) end)
    end
    end

    function sc_ReadoutAllSpeedcamInfo()
    MODEL.ui.lm_extendedSpeedCamList.setcurrent(index)
    sc_speedcamtest()
    end

    function sc_ReadoutSpeedcamInfo()
    MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id()
    sc_speedcamtest()
    end

    function sc_speedcamtest()
    if MODEL.warning["speedcam_soundtype_" .. MODEL.ui.lm_extendedSpeedCamList[current].id()]() then
    if MODEL.warning.is_spoken() then
    local number, unit = Format_Speed_Voice(MODEL.warning.driveralert.speed_limit())
    local scspeedunit = sc_GetSysEntry("voice", "announce_speed_unit", 0) and translate_voice(unit) or L""
    local scspeed = sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "say_camera_speed_limit", 0) and translated_voice_format("The speed limit is %s!", string.match(tostring(70), "^%d+")) .. L" " .. scspeedunit or L""
    local scoverspeed = sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "overspeed_min_speech_repeat_delay", 0) > 0 and translate_voice("Reduce your speed.") .. L" " .. scspeed or L""
    local sccatnam = translate_voice(sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "activated_speech", "")) or L""
    local distance = sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "say_camera_distance", 0) and translated_voice_format("After %s", sc_wVoiceFormat_search_distance(900)) or L""
    local sccatpass = translate_voice(sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "passed_speech", "")) or L""
    local avgspeedunit = vAVGPhraseUnit() and translate_voice(unit) or L""
    local avgphrase = vSaynewAverageSpeed() and translated_voice_format("Your average speed is %s", string.match(tostring(98), "^%d+")) .. L" " .. avgspeedunit or L""
    local avgtext = sc_GetSysEntry("speedcam_category:" .. MODEL.ui.lm_extendedSpeedCamList[MODEL.ui.lm_extendedSpeedCamList.index()].id(), "section_beep_distance", 0) and translate_voice("You are in an average speed check zone") .. L" " .. avgphrase or L""
    sc_Voice_TTS(distance .. L" " .. sccatnam .. L" " .. scspeed .. L" " .. avgtext .. L" " .. scoverspeed .. L" " .. sccatpass)
    else
    sc_speedcamtest_audio()
    end
    elseif MODEL.warning["speedcam_visualtype_" .. MODEL.ui.lm_extendedSpeedCamList[current].id()]() then
    sc_Voice_TTS(translate_voice("Visual warning only"))
    end
    end

    createState("st_SCWarningSignSound", {
    extends = {st_CommonList},
    useLayers = {"ui_ProximityAlertsSettingstest"},
    title = m_i18n("Speedcam Test"),
    })

    function sc_SetLastSpeedcamSpeedLimit()
    if (MODEL.navigation.curr_speedcam.speed_limit() > 0) then
    MODEL.lua.LastSpeedcamSpeedLimit = MODEL.navigation.curr_speedcam.speed_limit()
    if MODEL.lua.LastSpeedcamCategory() == 3 and MODEL.lua.LastSpeedcamSpeedLimit() == 5 then
    sc_ToggleSpeedcamSound()
    doDelayed(3, sc_ToggleSpeedcamSound)
    sc_OffSection()
    end
    end
    end

    function sc_SetLastSpeedcamCategory()
    MODEL.lua.LastSpeedcamCategory = MODEL.navigation.curr_speedcam.category()
    hook_SpeedCam_Notification()
    if SpeedcamAlarmInBack_ID ~= -1 then
    killDelayed(SpeedcamAlarmInBack_ID)
    SpeedcamAlarmInBack_ID = -1
    MODEL.lua.SpeedcamAlarmInBackCount = 0
    MODEL.lua.DistanceInBack = 0
    end
    end

    function sc_OnSpeedcam()
    obs_speedcam:START()
    Speedcam_On = true
    SpeedcamAlarm()
    end

    function sc_ChekSpeedcamInBack(category)
    return (category == 23)
    end

    function sc_OffSpeedcam()
    obs_speedcam:STOP()
    hook_Delete_Notification:trigger("alert_point","speed_camera_ahead")
    if MODEL.warning.is_spoken() and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() then
    local camerapassed = translate_voice(sc_GetSysEntry("speedcam_category:" .. MODEL.lua.LastSpeedcamCategory(), "passed_speech", ""))
    VW_LongTextToSay(camerapassed)
    end
    if SpeedcamAlarm_ID ~= -1 then
    killDelayed(SpeedcamAlarm_ID)
    SpeedcamAlarm_ID = -1
    end
    if Speedcam_On and MODEL.navigation.curr_speedcam.distance() < 50 and not SpeedcamInBack_FirstClick and sc_ChekSpeedcamInBack(MODEL.lua.LastSpeedcamCategory()) then
    hook_SpeedCamInBack_Notification()
    SpeedcamAlarmInBack()
    else
    if Speedcam_On and MODEL.lua.LastSpeedcamCategory() ~= 3 then
    MODEL.sound.playchanneltest("alarmeffect", MODEL.lua.AudioSpeedcamEnd())
    end
    end
    if MODEL.lua.SpeedCamAverageSpeed() then
    doDelayed(10, function()
    hook_Send_Notification:trigger("alert_zone", "in_average_speed_zone")
    SpeedcamAlarm()
    end)
    end
    Speedcam_On = false
    end

    function sc_SpeedcamClick()
    if SpeedcamAlarmInBack_ID ~= -1 then
    hook_Delete_Notification:trigger("alert_point", "speed_camera_back")
    killDelayed(SpeedcamAlarmInBack_ID)
    SpeedcamAlarmInBack_ID = -1
    MODEL.lua.SpeedcamAlarmInBackCount = 0
    MODEL.lua.DistanceInBack = 0
    SpeedcamInBack_FirstClick = false
    else
    killDelayed(SpeedcamAlarmInBack_ID)
    SpeedcamAlarmInBack_ID = -1
    SpeedcamInBack_FirstClick = true
    end
    sc_ToggleSpeedcamSound()
    doDelayed(5, sc_ToggleSpeedcamSound)
    MODEL.lua.SpeedCamAverageSpeed = false
    hook_Delete_Notification:trigger("alert_zone", "in_average_speed_zone")
    end

    function SpeedcamAlarm()
    if MODEL.lua.SpeedCamAverageSpeed() and MODEL.warning.speedcam_soundtype_3() and (MODEL.other.trips[0].speed_total_avg() > (MODEL.lua.LastSpeedcamSpeedLimit() + MODEL.lua.vOverspeedTolerance())) and MODEL.lua.LastSpeedcamSpeedLimit() ~= 5 and MODEL.lua.vOverspeedAlertDistance() > 0 then
    MODEL.sound.playchanneltest("alarmeffect", MODEL.lua.AudioSpeedcamOverspeed())
    end
    if not MODEL.lua.SpeedCamAverageSpeed() and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() and MODEL.navigation.curr_speedcam.distance.valid() and MODEL.navigation.car.current_speed() >= (MODEL.lua.LastSpeedcamSpeedLimit() + MODEL.lua.vOverspeedTolerance()) and (MODEL.lua.vOverspeedAlertDistance() >= MODEL.navigation.curr_speedcam.distance()) and MODEL.lua.LastSpeedcamCategory() ~= 3 and MODEL.lua.LastSpeedcamCategory() ~= 12 then
    MODEL.sound.playchanneltest("alarmeffect", MODEL.lua.AudioSpeedcamOverspeed())
    end
    SpeedcamAlarm_ID = doDelayed(150, SpeedcamAlarm)
    end

    function SpeedcamAlarmInBack()
    if MODEL.warning.is_spoken() and MODEL.navigation.car.current_speed() >= MODEL.lua.LastSpeedcamSpeedLimit() and SayReduce_trigger and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() then
    sc_Voice_TTS(translate_voice("Reduce your speed."))
    SayReduce_trigger = false
    end
    if MODEL.navigation.car.current_speed() >= (MODEL.lua.LastSpeedcamSpeedLimit() + MODEL.lua.vOverspeedTolerance()) and MODEL.warning["speedcam_soundtype_" .. MODEL.navigation.curr_speedcam.category()]() and (MODEL.lua.vOverspeedAlertDistance() > (MODEL.lua.DistanceInBack() * 10 / 18)) then
    MODEL.sound.play_effect("effects.ui.speedcam_alarm")
    end
    if MODEL.lua.DistanceInBack() < MODEL.lua.SpeedcamAlarmInBackDist() then
    if MODEL.lua.SpeedcamAlarmInBackCount() > 0 then
    MODEL.lua.DistanceInBack = MODEL.lua.DistanceInBack() + MODEL.navigation.car.current_speed()
    end
    MODEL.lua.SpeedcamAlarmInBackCount = MODEL.lua.SpeedcamAlarmInBackCount() + 1
    if not (MODEL.lua.SpeedcamAlarmInBackCount() % 4) then
    SayReduce_trigger = true
    end
    SpeedcamAlarmInBack_ID = doDelayed(150, SpeedcamAlarmInBack)
    else
    SpeedcamAlarmInBack_ID = -1
    MODEL.lua.SpeedcamAlarmInBackCount = 0
    MODEL.lua.DistanceInBack = 0
    hook_Delete_Notification:trigger("alert_point","speed_camera_back")
    if vEndSpeedcam() then
    MODEL.sound.play_effect("effects.ui.speedcam_end")
    end
    end
    end

    function sc_ResetFirstSpeedcamClick_new()
    SpeedcamInBack_FirstClick = false
    sc_ResetFirstClick()
    end

    function sc_OnSection()
    MODEL.lua.SpeedCamAverageSpeed = true
    if MODEL.lua.LastSpeedcamSpeedLimit() ~= 5 then
    MODEL.other.trips[0].reset()
    --MODEL.other.trips[0].speed_total_avg = MODEL.navigation.car.current_speed()
    doDelayed(150, function()
    hook_Send_Notification:trigger("alert_zone", "in_average_speed_zone")
    SpeedcamAlarm()
    end)
    end
    if MODEL.warning.is_spoken() and MODEL.navigation.curr_speedcam.avg_speed.valid() and MODEL.warning.speedcam_soundtype_3() and MODEL.lua.LastSpeedcamSpeedLimit() ~= 5 then
    doDelayed(300, function() sc_Voice_TTS(translate_voice("You are in an average speed check zone")) end)
    doDelayed(600, sc_SayInfoAverageSpeed)
    end
    end

    function sc_OffSection()
    ui.RMOverSpeed = 0
    sc_ToggleSpeedcamSound()
    doDelayed(3, sc_ToggleSpeedcamSound)
    doDelayed(5, function() MODEL.lua.SpeedCamAverageSpeed = false end)
    MODEL.sound.playchanneltest("alarmeffect", MODEL.lua.AudioSpeedcamEnd())
    if MODEL.warning.is_spoken() and MODEL.warning.speedcam_soundtype_3() then
    sc_Voice_TTS(translate_voice("End Average Speedcam."))
    end
    end

    function sc_SayInfoAverageSpeed()
    if MODEL.lua.SpeedCamAverageSpeed() and vSaynewAverageSpeed() and not MODEL.navigation.car_in_tunnel() then
    local number, unit = Format_Speed_Voice(MODEL.other.trips[0].speed_total_avg())
    local avgspeedunit = vAVGPhraseUnit() and translate_voice(unit) or L""
    local avgspeedphrase = translated_voice_format("Your average speed is %s", string.match(tostring(number), "^%d+")) .. L" " .. avgspeedunit
    sc_Voice_TTS(avgspeedphrase)
    doDelayed(MODEL.lua.TimeRepeateAverageSpeed() * 50, sc_SayInfoAverageSpeed)
    end
    end

    createState("st_LiveSpeedcamInCockpit_OnRelease", {
    extends = {st_CommonMap, st_FooterMenu},
    useLayers = {"ui_LiveSpeedcamInCockpit"},
    title = m_i18n("Live SpeedCam Settings"),
    onmapclick = sc_EmptyMapClick,
    init = function()
    ui_Header:HIDE()
    ui_MapControl:HIDE()
    MODEL.lua.CockpitMapMode = eCockpitMapMode.Mode_3D
    sc_SetCockpitMapMode()
    end,
    })

    createState("st_EditSpeedcam_live", {
    extends = {st_CommonMap, st_Popover, st_FooterMenu},
    useLayers = {"ui_EditSpeedcam_live"},
    skipLayers = {"ui_MapControl"},
    mapstate = "speedcam",
    popover = "ui.lm_SpeedLimitPopover",
    footermenu = "ui.lm_speedcam_footer",
    localmenu = "ui.lm_speedcam_localmenu",
    onmapclick = sc_EmptyMapClick,
    change_mode = function()
    local posx, posy
    local mapLayer = MODEL.map.primary()
    if MODEL.lua.IsLandscape() then
    posx = 20
    posy = 52
    else
    posx = 48
    posy = 28
    end
    mapLayer.center_posx = posx
    mapLayer.center_posy = posy
    end,
    enter = function()
    sc_SaveOriginalSpeedcamParams()
    MODEL.warning.manage.update_speedcam(MODEL.lua.SpeedCam_ID(), MODEL.lua.SpeedCam_Type(), MODEL.lua.SpeedCam_SpeedLimit(), MODEL.lua.SpeedCam_Direction(), MODEL.lua.SpeedCam_Direction_type())
    MODEL.map.primary.use_small_exclusion_box = 3
    end,
    init = function()
    MODEL.warning.speedcam_enabled = false
    ui.ui_Header.title = m_i18n("Add new alert point")
    sc_setDefaultMapZoom()
    doDelayed(1, function() MODEL.map.primary.center_noanim(MODEL.navigation.car.position()) end)
    MODEL.map.primary.show_tmc_icons = false
    end,
    done = function()
    MODEL.warning.speedcam_enabled = true
    MODEL.map.primary.show_tmc_icons = true
    end,
    exit = function()
    if gSpeedCamSaved then
    sc_SaveSpeedcamOK()
    else
    sc_RestoreOriginalSpeedcamParams()
    end
    MODEL.lua.managespeedcam = false
    gSpeedCamSaved = false
    end
    })

    function sc_AddSpeedCamLive()
    MODEL.lua.managespeedcam = false
    sc_AddSpeedcamNew()
    sc_NextStateAnim(st_EditSpeedcam_live, "fade", 1, "")
    end

    function sc_AddSpeedcamNew()
    local type, speedlimit, direction, direction_type, service, id
    speedlimit, direction, direction_type = MODEL.warning.manage.get_segment_params()
    MODEL.map.cursor.position = MODEL.navigation.car.position()
    type = 0
    id = ""
    service = 3
    MODEL.lua.SpeedCam_Pos = MODEL.map.cursor.position()
    MODEL.lua.SpeedCam_Type = type
    MODEL.lua.SpeedCam_SpeedLimit = speedlimit
    MODEL.lua.SpeedCam_Direction = direction
    MODEL.lua.SpeedCam_Direction_type = direction_type
    MODEL.lua.SpeedCam_Service = service
    MODEL.lua.SpeedCam_ID = id
    sc_ConvertSpeedToCurrent(speedlimit)
    if not sc_GetSpeedCamCatValue(MODEL.lua.SpeedCam_Type(), "speedlimit") then
    local segmentSpeedLimit = sc_GetSegmentSpeedLimit()
    MODEL.lua.SpeedCam_SpeedLimit = segmentSpeedLimit
    end
    end

    createState("st_PanicInCockpit_OnRelease", {
    extends = {primary, tBackgroundLayers},
    useLayers = {"primary", "ui_PanicInCockpit", "ui_Footer"},
    })

    createState("st_BigSpeedcamPosition", {
    extends = {st_CommonMap, st_FooterMenu},
    useLayers = {"ui_BigSpeedcamPosition"},
    onmapclick = sc_EmptyMapClick,
    init = function()
    ui_Header:HIDE()
    ui_MapControl:HIDE()
    MODEL.lua.CockpitMapMode = eCockpitMapMode.Mode_3D
    sc_SetCockpitMapMode()
    end,
    })

    PS: i tried to send message to master but his inbox its full
    PS2 My new map look

    Spoiler: screen
    IMAG1414

    And some shops

    Spoiler: screen2
    IMAG1415

    Thanks to: pongo for amazing skin, stefando,pavolino,Garigor,Alain57 ,kwbs, rondoan batiskaf,birbante (if someone dont find his name here, you are in my heart and mind) and to all who share their knowledge here, without their help can't made it
    Its not ready for sharing yet,are ready only gas station and some shops
    Last edited by cristianyxtl; 14th December 2022 at 09:53 AM.

  2.    Advertissements


  3. #3622
    Member + Skin iGO nextgen by pongo (DISCUSSION)
    Join Date
    Sep 2018
    Location
    Bucuresti
    Posts
    69
    Rep Power
    8

    Default

    If somebody know :
    Which code line must be added in the skin Pongo Nextgen, to obtain the visibility of Current time in cockpit (custom position) also in split navigation mode , not only in implicit mode?

  4. #3623
    Master
    Join Date
    Nov 2017
    Location
    Romania
    Posts
    336
    Rep Power
    161

    Default

    Quote Originally Posted by skiib View Post
    Hi guys i have igo luna with pongo skin. I have a problem with road zoom.
    when i am approaching roundabout it dosent zoom in before i am half way throug it.
    Is it possible to change this (in setting or in sys. )so program zooms in before getting to roundabout
    Try to play with mapcustom.zip from older version .

  5. #3624
    Master BIRBANTE's Avatar
    Join Date
    Jan 2016
    Location
    TUSCANY - ITALY
    Posts
    353
    Rep Power
    297

    Default

    Quote Originally Posted by cristianyxtl View Post
    but another problem appear :fixed camera its displayed as mobile camera on BigSpeedcam ,on the map are displayed corectly
    As i dont have any knowledge in coding (i understand somehow the old coding style but the new one its a pain) i dont know where to look .
    Are you using the original speedcam and speedcam_mod files or did you change some icons?

    In the Big Speedcam the icons of the nodpi folder appear, the various Speedwarn_normal_xxxxxx.svg, while on the map appear the speedwarn0 / speedwarn 1.bmp icons found in the xxhdpi folders etc.
    The other svg icons of the nodpi folder, the various Speedwarn_map_xxxxxxx.svg appear on the map when you add a Speedcam with the program, but only during insertion, after which the bmps appear.
    The speedwarn.svg and speedwarn_list.svg files are not svg images but text files that are used to match the various normal and map icons to the various categories.

    This is the current functioning of the icons in Nextgen, a cross between the old one and Luna's one, I wanted to answer you first but then I forgot.

  6. #3625
    Master
    Join Date
    Nov 2017
    Location
    Romania
    Posts
    336
    Rep Power
    161

    Default

    Quote Originally Posted by BIRBANTE
    Are you using the original speedcam and speedcam_mod files or did you change some icons?
    Speedcam.zip its the original one ,but speedcam_mod.zip its from Andrey Form
    I had some problems with speedcam distance ,warning at 350m its little and the cursor inside speedcam settings does not solve, then i change plugin from and old in the new one that was the problem with BIGSPEEDCAM to display other symbol , but i solve it by modifyng plugin.ini distances . I just i start to learn about speedcam to figure out how its working .Big problems for me its to learn to manipulate speedwarn1,bmp ,i asssume that speedwarn1.spr its same for all speedcams
    For now im pleased how speedcam works
    Last edited by cristianyxtl; 7th January 2023 at 06:15 PM.

  7. #3626
    Super Moderator Skin iGO nextgen by pongo (DISCUSSION)
    Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)
    Andrey Form's Avatar
    Join Date
    Oct 2019
    Location
    Belarus
    Posts
    2,284
    Rep Power
    2379

    Default

    @cristianyxtl

    There is a difference with combinations of incomplete mod and full

    speedcam.zip - original, speedcam_mod.zip - Mod AF

    Spoiler: ++
    [Only registered and activated users can see links. ]


    speedcam.zip - Mod AF, speedcam_mod.zip - Mod AF

    Spoiler: +
    [Only registered and activated users can see links. ]
    gps5

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]


    ŠAF_2020-25

  8. #3627
    Master
    Join Date
    Nov 2017
    Location
    Romania
    Posts
    336
    Rep Power
    161

    Default

    @Andrey Form , i noticed already the difference between different speedcam_mod after i dig it inside of every one
    I my opinion warning distance:350 m its quite little ,900 m will be better ,if you can change it

  9. #3628
    Super Moderator Skin iGO nextgen by pongo (DISCUSSION)
    Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)
    Andrey Form's Avatar
    Join Date
    Oct 2019
    Location
    Belarus
    Posts
    2,284
    Rep Power
    2379

    Default

    @cristianyxtl
    Alert distance need edit by yourself in plugin.ini , depending on your preferences, now all distance settings are reduced to a minimum, this minimum is great for the urban cycle.

    this data changes for each type
    warn_distances="00:350" - 350 meters alert
    approach_beep_distances=200 - repeat notification, determines after how many meters the repeat will be, assume in these settings the first notification is 350m, repeated after 200 meters - 150 meters remain to the point.

    for example change to

    warn_distances="00:650" - alert 650 meters
    approach_beep_distances=200 - repeat notification, determines after how many meters there will be a repeat, let's say in these settings the first notification is 650m, repeated after 200 meters - 450 meters remain to the point, then the notification is 250 meters and 50 meters to the point.

    or

    warn_distances="00:900" - alert 900 meters
    approach_beep_distances=400 - repeat notification, determines after how many meters there will be a repeat, let's say in these settings the first notification is 900m, repeated after 400 meters - 500 meters remain to the point, then the notification is 100 meters to the point.
    Last edited by Andrey Form; 8th January 2023 at 04:03 PM.
    gps5

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]


    ŠAF_2020-25

  10. #3629
    Member luisresende's Avatar
    Join Date
    Jun 2017
    Location
    Brazil
    Posts
    21
    Rep Power
    9

    Default

    Greetings
    I use the distance setting of the elertas as a function of the speed, so warning is given around 10 seconds.
    Assi, do not warn much in advance; nor too close, not to resettle to brake sharply.
    And I configure for each type of alert, because in some of them I use fixed distance.
    Example below:

    warn_distances=150:420,140:390,130:370,120:340,110:310,100:280,90:250,80:230,70:200,60:170,50:140,40:120,30:90,20:60,10:30

  11. #3630
    Super Moderator Skin iGO nextgen by pongo (DISCUSSION)
    Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)Skin iGO nextgen by pongo (DISCUSSION)
    Andrey Form's Avatar
    Join Date
    Oct 2019
    Location
    Belarus
    Posts
    2,284
    Rep Power
    2379

    Amigo nextgen

    Skin by pongo nextgen 2022-05-11

    Code:
    Please Login or Register to see the links

    Spoiler: Link

    Link
    This post requires you to click the "LIKE this post" button and hit F5 to read this content.
    Last edited by Andrey Form; 13th January 2023 at 11:38 AM.
    gps5

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]


    ŠAF_2020-25

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •