1
0
Fork 0

Compare commits

...

6 Commits

Author SHA1 Message Date
Egor Savkin 2868c8d4cd Update bundle and remove debug messages from production build
Signed-off-by: Egor Savkin <es@m-labs.hk>
2024-10-14 11:06:35 +08:00
Egor Savkin 20d829d60d Add warnings for the phaser being obstacled by next card 2024-10-14 11:04:49 +08:00
Egor Savkin f087a00cee Fix price not getting updated on crate clear and deletion
Signed-off-by: Egor Savkin <es@m-labs.hk>
2024-10-04 11:25:49 +08:00
Sébastien Bourdeauducq f69102fa0e update FAQ 2024-10-02 13:56:35 +08:00
Egor Savkin 0d978c1e22 Add mcx-idc 32 channel to the shop
The icon had to be altered in order to lower the risk of triggering trypophobia

Signed-off-by: Egor Savkin <es@m-labs.hk>
2024-09-27 13:47:04 +08:00
Sébastien Bourdeauducq 76bc87ce5c faq: add entries 2024-09-10 18:45:12 +08:00
6 changed files with 142 additions and 36 deletions

View File

@ -33,6 +33,7 @@ Typical countries where this situation happens and suitable distributor contacts
* China (mainland): kitty-zheng@kehua-trade.com * China (mainland): kitty-zheng@kehua-trade.com
* Japan: hishida@symphotony.com or h_yamamoto@autex-inc.co.jp * Japan: hishida@symphotony.com or h_yamamoto@autex-inc.co.jp
* India: sale.sannidhi@gmail.com * India: sale.sannidhi@gmail.com
* Thailand: info@irct.co.th or thayika@ryts-instruments.co.th
You are responsible for paying distributor fees and we do not grant discounts on the basis of requiring a distributor. On our side, we do not mandate the use of any distributor and we can ship directly to you or via another distributor of your choosing not listed here. Generally, you may solve the import problems created by customs and other bureaucracy in any way that you deem acceptable. You are responsible for paying distributor fees and we do not grant discounts on the basis of requiring a distributor. On our side, we do not mandate the use of any distributor and we can ship directly to you or via another distributor of your choosing not listed here. Generally, you may solve the import problems created by customs and other bureaucracy in any way that you deem acceptable.
@ -59,6 +60,18 @@ You can build a useful ARTIQ system and spend very little money by running the o
This is not a turn-key solution; experience with electronics, FPGA, and software development is required, and you will have to spend some time studying the code, porting it to these boards, writing drivers, and building hardware adapters. This is not a turn-key solution; experience with electronics, FPGA, and software development is required, and you will have to spend some time studying the code, porting it to these boards, writing drivers, and building hardware adapters.
See also [193THz.com](https://193THz.com) for ideas about low-cost homebrew laser systems.
##### Do you have a warranty?
For most products, we offer a 1-year warranty against manufacturing defects.
##### What should I do if I need technical support, or there is a problem with my order?
Please contact us at helpdesk@m-labs.hk.
If you have contacted the helpdesk and your issue cannot be satisfactorily resolved, then contact sb@m-labs.hk or text +852 65873703. Mention your helpdesk ticket number.
##### What are your payment terms? ##### What are your payment terms?
For most established institutions (determined at our discretion), we offer Net 15 and Net 30 terms after delivery. Please enquire from your institutional email address to help us determine your eligibility for these terms. For most established institutions (determined at our discretion), we offer Net 15 and Net 30 terms after delivery. Please enquire from your institutional email address to help us determine your eligibility for these terms.
@ -85,6 +98,14 @@ Exclusivity is subject to contractual minimum order volumes determined at our di
Some features are currently not available on the mirror site, and you may use a VPN or another circumvention measure of your choice to access these as required. Some features are currently not available on the mirror site, and you may use a VPN or another circumvention measure of your choice to access these as required.
##### Why are you ignoring my emails?
If you are using the email server of a large institution, be aware that some may silently drop emails sent to .hk email addresses and/or to servers located in Hong Kong.
Try sending your message from your personal address (for example Gmail, Outlook and Yahoo do not block our email system), or to the same email address at the m-labs-intl.com domain (for example, sales@m-labs-intl.com or sb@m-labs-intl.com).
Alternatively, you may use our [contact phone numbers](../office/), which are also registered with several popular messaging apps.
##### We are a recruitment firm. Can we help you find talent? ##### We are a recruitment firm. Can we help you find talent?
No. No.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 117 KiB

File diff suppressed because one or more lines are too long

View File

@ -480,7 +480,7 @@ const useCart = ((set, get) => ({
let itemsCopy = Array.from(crate.items); let itemsCopy = Array.from(crate.items);
const disabled = !!get().crateParams(crate.crate_mode).warnings_disabled; const disabled = !!get().crateParams(crate.crate_mode).warnings_disabled;
itemsCopy = FillResources(itemsCopy, disabled); itemsCopy = FillResources(itemsCopy, disabled);
itemsCopy = TriggerWarnings(itemsCopy, disabled); itemsCopy = TriggerWarnings(itemsCopy, disabled, crate);
const [crate_warnings, occupied] = TriggerCrateWarnings(crate); const [crate_warnings, occupied] = TriggerCrateWarnings(crate);
return { return {
...crate, ...crate,
@ -553,6 +553,7 @@ const useCart = ((set, get) => ({
delCrate: (id) => { delCrate: (id) => {
get()._delCrate(id); get()._delCrate(id);
get().fillOrderExtData(); get().fillOrderExtData();
get()._updateTotalOrderPrice();
}, },
addCardFromCatalog: (crate_to, index_from, index_to, just_mounted) => { addCardFromCatalog: (crate_to, index_from, index_to, just_mounted) => {
@ -594,6 +595,7 @@ const useCart = ((set, get) => ({
clearCrate: (id) => { clearCrate: (id) => {
get()._clearCrate(id); get()._clearCrate(id);
get().fillWarnings(id); get().fillWarnings(id);
get()._updateTotalOrderPrice();
}, },
updateOptions: (crate_id, index, new_options) => { updateOptions: (crate_id, index, new_options) => {

View File

@ -30,14 +30,14 @@ const find_next_source_index = (data, index, source) => {
} }
const not_enough_resource_trigger = (name) => { const not_enough_resource_trigger = (name) => {
return (_data, _index, counters) => { return (_data, _index, counters, _crate) => {
const resource = find_in_counters(counters, name); const resource = find_in_counters(counters, name);
return resource.occupied > resource.max; return resource.occupied > resource.max;
} }
} }
const no_source_trigger = (name) => { const no_source_trigger = (name) => {
return (data, index, _counters) => { return (data, index, _counters, _crate) => {
const occupied = item_occupied_counters[name](data[index]); const occupied = item_occupied_counters[name](data[index]);
if (occupied > 0) if (occupied > 0)
return !find_previous_source(data, index, name); return !find_previous_source(data, index, name);
@ -46,12 +46,20 @@ const no_source_trigger = (name) => {
} }
const wiring_constraint = (name) => { const wiring_constraint = (name) => {
return (data, index, _counters) => { return (data, index, _counters, _crate) => {
const next = find_next_source_index(data, index, name); const next = find_next_source_index(data, index, name);
return next - index === 1; return next - index === 1;
} }
} }
const phaser_next_card_long = (data, index, counters, crate) => {
const nbrOccupied = resource_counters.hp(crate.items, -1);
const nbrHP = useShopStore.getState().crateParams(crate.crate_mode).hp;
return (index < data.length - 1) ? (
(data[index+1].consumes && data[index+1].consumes.depth && data[index+1].consumes.depth >= 8.5)
) : (nbrOccupied >= nbrHP && nbrHP > 0)
}
const Types = { const Types = {
"eem_resource": { "eem_resource": {
level: "warning", level: "warning",
@ -88,22 +96,27 @@ const Types = {
trigger: wiring_constraint("eem"), trigger: wiring_constraint("eem"),
message: "Due to wiring constraints, the carrier can only connect to EEM cards immediately at its right, without crossing another carrier." message: "Due to wiring constraints, the carrier can only connect to EEM cards immediately at its right, without crossing another carrier."
}, },
"phaser_next_card_long": {
level: "reminder",
trigger: phaser_next_card_long,
message: "Next card may interfere with this Phaser. Consider placing a short card after this Phaser."
},
"default": { "default": {
level: "warning", level: "warning",
trigger: (_a, _b, _c) => { trigger: (_a, _b, _c, _d) => {
return true; return true;
}, },
message: 'This item has unimplemented warning' message: 'This item has unimplemented warning'
} }
} }
export function TriggerWarnings(data, disabled) { export function TriggerWarnings(data, disabled, crate) {
return data.map((element, index) => { return data.map((element, index) => {
if (!element.warnings) return element; if (!element.warnings) return element;
element.show_warnings = disabled ? [] :element.warnings element.show_warnings = disabled ? [] :element.warnings
.map((warning, _) => { .map((warning, _) => {
if (!!Types[warning]) if (!!Types[warning])
return Types[warning].trigger(data, index, element.counted_resources) ? {trigger: undefined, name: warning, ...Types[warning]} : null; return Types[warning].trigger(data, index, element.counted_resources, crate) ? {trigger: undefined, name: warning, ...Types[warning]} : null;
else else
return Types.default; return Types.default;
}) })
@ -143,6 +156,22 @@ const crate_warnings = {
const nbrHPDesktop = useShopStore.getState().crate_modes.desktop.hp; const nbrHPDesktop = useShopStore.getState().crate_modes.desktop.hp;
return crate.crate_mode === useShopStore.getState().crate_modes.rack.id && occupied < nbrHPDesktop; return crate.crate_mode === useShopStore.getState().crate_modes.rack.id && occupied < nbrHPDesktop;
} }
},
"phaser_not_fit": {
message: "Since one or more Phasers may interfere with their next cards, they may additional space, that wouldn't fit into the crate. Consider removing cards, placing short cards after Phaser(s), or choosing larger crate.",
level: "warning",
trigger: (crate, occupied) => {
const nbrHP = useShopStore.getState().crateParams(crate.crate_mode).hp;
const stacked_phasers = crate.items.filter((elem, index, data) => {
return (elem.name_codename === "Phaser") && ((index < data.length - 1) ? (
(data[index + 1].consumes && data[index + 1].consumes.depth && data[index + 1].consumes.depth >= 8.5)
) : (occupied >= nbrHP && nbrHP > 0))
}
).length;
// #!debug
console.log(stacked_phasers, occupied)
return stacked_phasers > 0 && (occupied + stacked_phasers*2 >= nbrHP) && nbrHP >0;
}
} }
} }

View File

@ -221,7 +221,8 @@ const shop_data = {
"eem_wiring_constraint" "eem_wiring_constraint"
], ],
consumes: { consumes: {
hp: 8 hp: 8,
depth: 20
} }
}, },
'kaslisoc': { 'kaslisoc': {
@ -297,7 +298,8 @@ const shop_data = {
"eem_wiring_constraint" "eem_wiring_constraint"
], ],
consumes: { consumes: {
hp: 8 hp: 8,
depth: 20
} }
}, },
'vhdcicarrier': { 'vhdcicarrier': {
@ -322,7 +324,8 @@ const shop_data = {
"eem_wiring_constraint" "eem_wiring_constraint"
], ],
consumes: { consumes: {
hp: 8 hp: 8,
depth: 16
} }
}, },
'bnc-dio': { 'bnc-dio': {
@ -393,7 +396,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 8, hp: 8,
eem: 1 eem: 1,
depth: 7
} }
}, },
'sma-dio': { 'sma-dio': {
@ -458,7 +462,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1 eem: 1,
depth: 7
} }
}, },
'mcx-dio': { 'mcx-dio': {
@ -549,7 +554,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 2 eem: 2,
depth: 23
} }
}, },
'rj45-dio': { 'rj45-dio': {
@ -635,7 +641,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 2 eem: 2,
depth: 7
} }
}, },
'urukul': { 'urukul': {
@ -700,7 +707,8 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 2, eem: 2,
clk: 1 clk: 1,
depth: 16
} }
}, },
'urukul_4412': { 'urukul_4412': {
@ -738,7 +746,8 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 2, eem: 2,
clk: 1 clk: 1,
depth: 16
} }
}, },
'phaser': { 'phaser': {
@ -767,12 +776,14 @@ const shop_data = {
size: 'small', size: 'small',
warnings: [ warnings: [
"no_eem_source", "no_eem_source",
"no_clk_source" "no_clk_source",
"phaser_next_card_long"
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 16 // heatsink 8.5
} }
}, },
'zotino': { 'zotino': {
@ -814,7 +825,8 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1, eem: 1,
tec: 1 tec: 1,
depth: 16
}, },
resources: [ resources: [
{name: "idc", max: 4} {name: "idc", max: 4}
@ -842,7 +854,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1 eem: 1,
depth: 17
}, },
resources: [ resources: [
{name: "idc", max: 4} {name: "idc", max: 4}
@ -866,7 +879,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 8, hp: 8,
idc: 1 idc: 1,
depth: 6
} }
}, },
'hvamp32': { 'hvamp32': {
@ -903,7 +917,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
idc: 4 idc: 4,
depth: 16
} }
}, },
'idc-sma-adapter': { 'idc-sma-adapter': {
@ -924,7 +939,29 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
idc: 1 idc: 1,
depth: 6
}
},
'idc-mcx-adapter': {
id: 'idc-mcx-adapter',
name: 'MCX-IDC',
name_number: '5538',
name_codename: '',
price: 320,
image: '/images/shop/graphic-03_MCX-IDC32.svg',
specs: [
'Breaks out analog signals from Zotino or HD68-IDC to MCX connectors.',
'Each card provides 32 channels.',
],
size: 'big',
type: 'idc-bnc',
warnings: [
"no_idc_source"
],
consumes: {
hp: 8,
idc: 4
} }
}, },
'hd68-idc-adapter': { 'hd68-idc-adapter': {
@ -946,7 +983,8 @@ const shop_data = {
"idc_resource" "idc_resource"
], ],
consumes: { consumes: {
hp: 4 hp: 4,
depth: 5
}, },
resources: [ resources: [
{name: "idc", max: 4} {name: "idc", max: 4}
@ -999,7 +1037,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 8, hp: 8,
eem: 2 eem: 2,
depth: 16
} }
}, },
'koster': { 'koster': {
@ -1025,7 +1064,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 2 eem: 2,
depth: 7.5
} }
}, },
'clocker': { 'clocker': {
@ -1056,7 +1096,8 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 7
}, },
resources: [ resources: [
{name: "clk", max: 6} {name: "clk", max: 6}
@ -1093,7 +1134,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1 eem: 1,
depth: 16
}, },
}, },
'fast_servo': { 'fast_servo': {
@ -1127,7 +1169,8 @@ const shop_data = {
], ],
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1 eem: 1,
depth: 16
}, },
}, },
'mirny': { 'mirny': {
@ -1158,7 +1201,8 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 16
}, },
}, },
'almazny': { 'almazny': {
@ -1186,7 +1230,8 @@ const shop_data = {
consumes: { consumes: {
hp: 8, hp: 8,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 16
}, },
}, },
'thermostat-eem': { 'thermostat-eem': {
@ -1214,6 +1259,7 @@ const shop_data = {
consumes: { consumes: {
hp: 4, hp: 4,
eem: 1, eem: 1,
depth: 16
} }
}, },
'thermostat2ch': { 'thermostat2ch': {
@ -1232,7 +1278,8 @@ const shop_data = {
], ],
size: 'small', size: 'small',
consumes: { consumes: {
hp: 4 hp: 4,
depth: 12
}, },
resources: [ resources: [
{name: "tec", max: 2} {name: "tec", max: 2}
@ -1261,7 +1308,8 @@ const shop_data = {
consumes: { consumes: {
hp: 8, hp: 8,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 8
}, },
}, },
'pounder': { 'pounder': {
@ -1295,7 +1343,8 @@ const shop_data = {
consumes: { consumes: {
hp: 8, hp: 8,
eem: 1, eem: 1,
clk: 1 clk: 1,
depth: 16
} }
}, },
'eem_pwr_mod': { 'eem_pwr_mod': {
@ -1320,6 +1369,7 @@ const shop_data = {
warnings: [], warnings: [],
consumes: { consumes: {
hp: 8, hp: 8,
depth: 20
}, },
}, },
'kirdy': { 'kirdy': {
@ -1351,6 +1401,7 @@ const shop_data = {
warnings: [], warnings: [],
consumes: { consumes: {
hp: 8, hp: 8,
depth: 16
}, },
}, },
}, },
@ -1395,6 +1446,7 @@ const shop_data = {
itemIds: [ itemIds: [
'idc-bnc-adapter', 'idc-bnc-adapter',
'idc-sma-adapter', 'idc-sma-adapter',
'idc-mcx-adapter',
'hd68-idc-adapter', 'hd68-idc-adapter',
'vhdcicarrier']}, 'vhdcicarrier']},
{ name: 'Servos', { name: 'Servos',