forked from M-Labs/web2019
Add 2 channel thermostat to shop
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
69cd11e3f1
commit
d3cc86dfa5
5
static/images/shop/graphic-03_Thermostat2ch.svg
Normal file
5
static/images/shop/graphic-03_Thermostat2ch.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 35 KiB |
File diff suppressed because one or more lines are too long
@ -33,7 +33,8 @@ function ClockRenderer({occupied, max}) {
|
||||
const resource_progress_renderers = {
|
||||
"eem": EEMRenderer,
|
||||
"clk": ClockRenderer,
|
||||
"idc": EEMRenderer
|
||||
"idc": EEMRenderer,
|
||||
"tec": EEMRenderer
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +46,10 @@ function IDCTipRender({occupied, max}) {
|
||||
return (<p key={uuidv4()}>{`${occupied}/${max} IDC connectors used`}</p>);
|
||||
}
|
||||
|
||||
function TECTipRender({occupied, max}) {
|
||||
return (<p key={uuidv4()}>{`${occupied}/${max} TEC connectors used`}</p>);
|
||||
}
|
||||
|
||||
function ClockTipRender({occupied, max}) {
|
||||
return (<p key={uuidv4()}>{`${occupied}/${max} clock connectors used`}</p>);
|
||||
}
|
||||
@ -52,7 +57,8 @@ function ClockTipRender({occupied, max}) {
|
||||
const resource_tip = {
|
||||
"eem": EEMTipRender,
|
||||
"clk": ClockTipRender,
|
||||
"idc": IDCTipRender
|
||||
"idc": IDCTipRender,
|
||||
"tec": TECTipRender
|
||||
}
|
||||
|
||||
function RenderResources({resources, library}) {
|
||||
|
@ -26,10 +26,15 @@ const count_item_occupied_hp = (item) => {
|
||||
return (item.consumes && item.consumes.hp) || 0;
|
||||
}
|
||||
|
||||
const count_item_occupied_tec = (item) => {
|
||||
return (item.options_data && item.options_data.tec === false) ? 0 : (item.consumes && item.consumes.tec);
|
||||
}
|
||||
|
||||
export const item_occupied_counters = {
|
||||
"eem": count_item_occupied_eem,
|
||||
"clk": count_item_occupied_clock,
|
||||
"idc": count_item_occupied_idc,
|
||||
"tec": count_item_occupied_tec,
|
||||
"hp": count_item_occupied_hp,
|
||||
}
|
||||
|
||||
@ -49,6 +54,7 @@ export const resource_counters = {
|
||||
"clk": CounterFactory("clk"),
|
||||
"idc": CounterFactory("idc"),
|
||||
"hp": CounterFactory("hp"),
|
||||
"tec": CounterFactory("tec"),
|
||||
}
|
||||
|
||||
export function CountResources(data, index) {
|
||||
|
@ -6,9 +6,11 @@ export const true_type_of = (obj) => Object.prototype.toString.call(obj).slice(8
|
||||
|
||||
export function FillExtCardData(data, index) {
|
||||
return {
|
||||
// we cannot use value id, because they are substituted with uuid
|
||||
has_other_dio: data.filter((value, item_index) => index !== item_index && value.name &&value.name.endsWith("-TTL")).length > 0,
|
||||
has_dds: data.filter(((value, _) => value.name === "DDS" && value.name_number === "4410" && (!value.options_data || !value.options_data.mono_eem))).length > 0,
|
||||
has_sampler: data.filter(((value, _) => value.name === "Sampler" && (!value.options_data || !value.options_data.mono_eem))).length > 0,
|
||||
has_thermostat: data.filter((value, item_index) => index !== item_index && value.name_number && value.name_number === '8451').length > 0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -801,7 +801,17 @@ const shop_data = {
|
||||
'DAC temperature can be stabilized using the Sinara 8451 Thermostat (sold separately).'
|
||||
],
|
||||
options: [
|
||||
{type: "Switch", args: {title: "TEC", outvar: "tec", tip: "Used for stabilizing temperature with Sinara 8451 Thermostat"}},
|
||||
{
|
||||
"if": [
|
||||
{"var": "ext_data.has_thermostat"},
|
||||
[
|
||||
{type: "Switch", args: {title: "TEC", outvar: "tec", fallback: true, tip: "Used for stabilizing temperature with Sinara 8451 Thermostat"}}
|
||||
],
|
||||
[
|
||||
{type: "Switch", args: {title: "TEC", outvar: "tec", tip: "Used for stabilizing temperature with Sinara 8451 Thermostat"}}
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
datasheet_file: '/docs/sinara-datasheets/5432.pdf',
|
||||
datasheet_name: '5432 Zotino datasheet',
|
||||
@ -813,7 +823,8 @@ const shop_data = {
|
||||
],
|
||||
consumes: {
|
||||
hp: 4,
|
||||
eem: 1
|
||||
eem: 1,
|
||||
tec: 1
|
||||
},
|
||||
resources: [
|
||||
{name: "idc", max: 4}
|
||||
@ -1190,6 +1201,29 @@ const shop_data = {
|
||||
eem: 1,
|
||||
}
|
||||
},
|
||||
'thermostat2ch': {
|
||||
id: 'thermostat2ch',
|
||||
name: 'Thermostat',
|
||||
name_number: '8451',
|
||||
name_codename: '',
|
||||
price: 900,
|
||||
image: '/images/shop/graphic-03_Thermostat2ch.svg',
|
||||
specs: [
|
||||
'2 TEC channels.',
|
||||
'Parallel output 10 pin IDC 2.54mm and 5 pin 3.81mm connectors per channel.',
|
||||
'Up to 8W (+/-2A with 4V compliance) heater/TEC drive from MAX1968 drivers.',
|
||||
'100Base-T Ethernet with PoE.',
|
||||
'Can stabilize temperature of Sinara 5432 DAC or external devices containing TEC and thermistor.'
|
||||
],
|
||||
size: 'small',
|
||||
type: null,
|
||||
consumes: {
|
||||
hp: 4
|
||||
},
|
||||
resources: [
|
||||
{name: "tec", max: 2}
|
||||
]
|
||||
},
|
||||
'shuttler': {
|
||||
id: 'shuttler',
|
||||
name: 'DAC',
|
||||
@ -1325,6 +1359,7 @@ const shop_data = {
|
||||
'stabilizer',
|
||||
'fast_servo',
|
||||
'pounder',
|
||||
'thermostat2ch',
|
||||
'thermostat-eem']},
|
||||
{ name: 'Misc',
|
||||
itemIds: [
|
||||
|
Loading…
Reference in New Issue
Block a user