Skip to content

Commit

Permalink
Fix up awtube-urdfviz
Browse files Browse the repository at this point in the history
  • Loading branch information
alfie committed Nov 19, 2024
1 parent dd3227e commit d67bfae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
9 changes: 4 additions & 5 deletions vendors/ibt/apps/awtube-urdfviz/src/AppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useEffect, useState } from "react"
import styled from "styled-components"
import { ItemType } from "antd/es/menu/hooks/useItems"
import { AwTubeModel, useAwTubeModel } from "./model/ModelProvider"
import { useConfigLoader } from "@glowbuzzer/store"

const StyledDiv = styled.div`
display: flex;
Expand All @@ -25,13 +24,13 @@ const StyledDiv = styled.div`
export const AppMenu = () => {
const viewMenu = useDockViewMenu()
const [showPrefs, setShowPrefs] = useState(false)
const loader = useConfigLoader()
const { config, changeModel } = useAwTubeModel()

useEffect(() => {
loader(config, true).then(() => {
console.log("switched")
})
console.log("Config switching not currently implemented")
// loader(config, true).then(() => {
// console.log("switched")
// })
}, [config])

function switch_l() {
Expand Down
4 changes: 3 additions & 1 deletion vendors/ibt/apps/awtube-urdfviz/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ const ConfigSwitcher = () => {
const { config } = useAwTubeModel()

return (
<GlowbuzzerApp appName="aware-urdfviz" configuration={config}>
<GlowbuzzerApp appName="aware-urdfviz"
// configuration={config}
>
<App />
</GlowbuzzerApp>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const ModelProvider = ({ children }: { children: ReactNode }) => {
const context = useMemo(() => {
return {
model,
config: model === AwTubeModel.AWTUBE_L ? config_awtube_l : config_awtube_l2,
// config: model === AwTubeModel.AWTUBE_L ? config_awtube_l : config_awtube_l2,
parts: model === AwTubeModel.AWTUBE_L ? definition_l : definition_l2,
changeModel
}
Expand Down

0 comments on commit d67bfae

Please sign in to comment.